11 import os |
11 import os |
12 |
12 |
13 from PyQt6.QtCore import pyqtSignal, QObject, QTranslator |
13 from PyQt6.QtCore import pyqtSignal, QObject, QTranslator |
14 from PyQt6.QtGui import QAction |
14 from PyQt6.QtGui import QAction |
15 |
15 |
16 from EricGui.EricAction import EricAction |
16 from eric7 import Preferences |
17 |
17 from eric7.EricGui.EricAction import EricAction |
18 from EricWidgets.EricApplication import ericApp |
18 from eric7.EricWidgets import EricMessageBox |
19 from EricWidgets import EricMessageBox |
19 from eric7.EricWidgets.EricApplication import ericApp |
20 |
20 from eric7.Project.ProjectBrowserModel import ProjectBrowserFileItem |
21 from Project.ProjectBrowserModel import ProjectBrowserFileItem |
21 from eric7.Utilities import determinePythonVersion |
22 |
|
23 import Preferences |
|
24 from Utilities import determinePythonVersion |
|
25 |
22 |
26 # Start-Of-Header |
23 # Start-Of-Header |
27 name = "Radon Metrics Plugin" |
24 name = "Radon Metrics Plugin" |
28 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
25 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
29 autoactivate = True |
26 autoactivate = True |
30 deactivateable = True |
27 deactivateable = True |
31 version = "10.0.3" |
28 version = "10.1.0" |
32 className = "RadonMetricsPlugin" |
29 className = "RadonMetricsPlugin" |
33 packageName = "RadonMetrics" |
30 packageName = "RadonMetrics" |
34 shortDescription = "Code metrics plugin using radon package" |
31 shortDescription = "Code metrics plugin using radon package" |
35 longDescription = ( |
32 longDescription = ( |
36 """This plug-in implements dialogs to show various code metrics. These""" |
33 """This plug-in implements dialogs to show various code metrics. These""" |
1059 @param pipInstall function to be called with a list of package names. |
1056 @param pipInstall function to be called with a list of package names. |
1060 @type function |
1057 @type function |
1061 """ |
1058 """ |
1062 try: |
1059 try: |
1063 from radon import __version__ as radon_version |
1060 from radon import __version__ as radon_version |
1064 import Globals |
1061 from eric7 import Globals |
1065 |
1062 |
1066 if Globals.versionToTuple(radon_version) < (4, 5, 0): |
1063 if Globals.versionToTuple(radon_version) < (4, 5, 0): |
1067 # force an upgrade |
1064 # force an upgrade |
1068 pipInstall(["radon>=4.5.0"]) |
1065 pipInstall(["radon>=4.5.0"]) |
1069 except ImportError: |
1066 except ImportError: |