Tue, 23 Jun 2020 19:05:15 +0200
Removed support for Python2.
--- a/ChangeLog Wed Jan 01 11:58:55 2020 +0100 +++ b/ChangeLog Tue Jun 23 19:05:15 2020 +0200 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 3.0.0: +- removed support for Python2 + Version 2.1.0: - bug fixes - upgraded embedded Radon library to version 3.0.1
--- a/PluginMetricsRadon.e4p Wed Jan 01 11:58:55 2020 +0100 +++ b/PluginMetricsRadon.e4p Tue Jun 23 19:05:15 2020 +0200 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Project SYSTEM "Project-5.1.dtd"> <!-- eric project file for project PluginMetricsRadon --> -<!-- Copyright (C) 2018 Detlev Offenbach, detlev@die-offenbachs.de --> +<!-- Copyright (C) 2020 Detlev Offenbach, detlev@die-offenbachs.de --> <Project version="5.1"> <Language>en_US</Language> <Hash>662232fb888fb1b426cf967a2c238f4dd2f58f08</Hash> @@ -237,6 +237,34 @@ <value> <dict> <key> + <string>AnnotationsChecker</string> + </key> + <value> + <dict> + <key> + <string>MaximumComplexity</string> + </key> + <value> + <int>3</int> + </value> + <key> + <string>MinimumCoverage</string> + </key> + <value> + <int>75</int> + </value> + </dict> + </value> + <key> + <string>BlankLines</string> + </key> + <value> + <tuple> + <int>2</int> + <int>1</int> + </tuple> + </value> + <key> <string>BuiltinsChecker</string> </key> <value> @@ -268,6 +296,19 @@ </dict> </value> <key> + <string>CommentedCodeChecker</string> + </key> + <value> + <dict> + <key> + <string>Aggressive</string> + </key> + <value> + <bool>False</bool> + </value> + </dict> + </value> + <key> <string>CopyrightAuthor</string> </key> <value> @@ -286,6 +327,12 @@ <string>eric</string> </value> <key> + <string>EnabledCheckerCategories</string> + </key> + <value> + <string>C, D, E, M, N, S, W</string> + </value> + <key> <string>ExcludeFiles</string> </key> <value> @@ -295,7 +342,7 @@ <string>ExcludeMessages</string> </key> <value> - <string>C101, E265, E266, E305, E402, M811, N802, N803, N807, N808, N821, W293, M201</string> + <string>C101,E265,E266,E305,E402,M811,N802,N803,N807,N808,N821,W293,M201,W504</string> </value> <key> <string>FixCodes</string> @@ -313,7 +360,7 @@ <string>FutureChecker</string> </key> <value> - <string>unicode_literals</string> + <string></string> </value> <key> <string>HangClosing</string> @@ -346,6 +393,12 @@ <int>10</int> </value> <key> + <string>MaxDocLineLength</string> + </key> + <value> + <int>79</int> + </value> + <key> <string>MaxLineLength</string> </key> <value> @@ -364,6 +417,91 @@ <bool>True</bool> </value> <key> + <string>SecurityChecker</string> + </key> + <value> + <dict> + <key> + <string>CheckTypedException</string> + </key> + <value> + <bool>False</bool> + </value> + <key> + <string>HardcodedTmpDirectories</string> + </key> + <value> + <list> + <string>/tmp</string> + <string>/var/tmp</string> + <string>/dev/shm</string> + <string>~/tmp</string> + </list> + </value> + <key> + <string>InsecureHashes</string> + </key> + <value> + <list> + <string>md4</string> + <string>md5</string> + <string>sha</string> + <string>sha1</string> + </list> + </value> + <key> + <string>InsecureSslProtocolVersions</string> + </key> + <value> + <list> + <string>PROTOCOL_SSLv2</string> + <string>SSLv2_METHOD</string> + <string>SSLv23_METHOD</string> + <string>PROTOCOL_SSLv3</string> + <string>PROTOCOL_TLSv1</string> + <string>SSLv3_METHOD</string> + <string>TLSv1_METHOD</string> + </list> + </value> + <key> + <string>WeakKeySizeDsaHigh</string> + </key> + <value> + <string>1024</string> + </value> + <key> + <string>WeakKeySizeDsaMedium</string> + </key> + <value> + <string>2048</string> + </value> + <key> + <string>WeakKeySizeEcHigh</string> + </key> + <value> + <string>160</string> + </value> + <key> + <string>WeakKeySizeEcMedium</string> + </key> + <value> + <string>224</string> + </value> + <key> + <string>WeakKeySizeRsaHigh</string> + </key> + <value> + <string>1024</string> + </value> + <key> + <string>WeakKeySizeRsaMedium</string> + </key> + <value> + <string>2048</string> + </value> + </dict> + </value> + <key> <string>ShowIgnored</string> </key> <value>
--- a/PluginMetricsRadon.py Wed Jan 01 11:58:55 2020 +0100 +++ b/PluginMetricsRadon.py Tue Jun 23 19:05:15 2020 +0200 @@ -7,8 +7,6 @@ Module implementing the radon code metrics plug-in. """ -from __future__ import unicode_literals - import os from PyQt5.QtCore import pyqtSignal, QObject, QTranslator @@ -28,7 +26,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "2.1.0" +version = "3.0.0" className = "RadonMetricsPlugin" packageName = "RadonMetrics" shortDescription = "Code metrics plugin using radon package" @@ -41,7 +39,6 @@ ) needsRestart = False pyqtApi = 2 -python2Compatible = True # End-Of-Header error = "" @@ -80,95 +77,33 @@ self.backgroundService = e5App().getObject("BackgroundService") path = os.path.join(os.path.dirname(__file__), packageName) - try: - # raw code metrics calculation - self.backgroundService.serviceConnect( - 'radon_raw', 'Python2', path, 'CodeMetricsCalculator', - lambda fn, res: self.metricsCalculationDone("raw", fn, res), - onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy2( - "raw", fx, lang, fn, msg), - onBatchDone=lambda fx, lang: self.batchJobDone( - "raw", fx, lang)) - self.backgroundService.serviceConnect( - 'radon_raw', 'Python3', path, 'CodeMetricsCalculator', - lambda fn, res: self.metricsCalculationDone("raw", fn, res), - onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy3( - "raw", fx, lang, fn, msg), - onBatchDone=lambda fx, lang: self.batchJobDone( - "raw", fx, lang)) - - # maintainability index calculation - self.backgroundService.serviceConnect( - 'radon_mi', 'Python2', path, 'MaintainabilityIndexCalculator', - lambda fn, res: self.metricsCalculationDone("mi", fn, res), - onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy2( - "mi", fx, lang, fn, msg), - onBatchDone=lambda fx, lang: self.batchJobDone( - "mi", fx, lang)) - self.backgroundService.serviceConnect( - 'radon_mi', 'Python3', path, 'MaintainabilityIndexCalculator', - lambda fn, res: self.metricsCalculationDone("mi", fn, res), - onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy3( - "mi", fx, lang, fn, msg), - onBatchDone=lambda fx, lang: self.batchJobDone( - "mi", fx, lang)) - - # cyclomatic complexity - self.backgroundService.serviceConnect( - 'radon_cc', 'Python2', path, 'CyclomaticComplexityCalculator', - lambda fn, res: self.metricsCalculationDone("cc", fn, res), - onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy2( - "cc", fx, lang, fn, msg), - onBatchDone=lambda fx, lang: self.batchJobDone( - "c", fx, lang)) - self.backgroundService.serviceConnect( - 'radon_cc', 'Python3', path, 'CyclomaticComplexityCalculator', - lambda fn, res: self.metricsCalculationDone("cc", fn, res), - onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy3( - "cc", fx, lang, fn, msg), - onBatchDone=lambda fx, lang: self.batchJobDone( - "cc", fx, lang)) - - self.hasBatch = True - except TypeError: - # backward compatibility for eric 6.0 - # raw code metrics calculation - self.backgroundService.serviceConnect( - 'radon_raw', 'Python2', path, 'CodeMetricsCalculator', - lambda fn, res: self.metricsCalculationDone("raw", fn, res), - onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy2( - "raw", fx, lang, fn, msg)) - self.backgroundService.serviceConnect( - 'radon_raw', 'Python3', path, 'CodeMetricsCalculator', - lambda fn, res: self.metricsCalculationDone("raw", fn, res), - onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy3( - "raw", fx, lang, fn, msg)) - - # maintainability index calculation - self.backgroundService.serviceConnect( - 'radon_mi', 'Python2', path, 'MaintainabilityIndexCalculator', - lambda fn, res: self.metricsCalculationDone("mi", fn, res), - onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy2( - "mi", fx, lang, fn, msg)) - self.backgroundService.serviceConnect( - 'radon_mi', 'Python3', path, 'MaintainabilityIndexCalculator', - lambda fn, res: self.metricsCalculationDone("mi", fn, res), - onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy3( - "mi", fx, lang, fn, msg)) - - # cyclomatic complexity - self.backgroundService.serviceConnect( - 'radon_cc', 'Python2', path, 'CyclomaticComplexityCalculator', - lambda fn, res: self.metricsCalculationDone("cc", fn, res), - onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy2( - "cc", fx, lang, fn, msg)) - self.backgroundService.serviceConnect( - 'radon_cc', 'Python3', path, 'CyclomaticComplexityCalculator', - lambda fn, res: self.metricsCalculationDone("cc", fn, res), - onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy3( - "cc", fx, lang, fn, msg)) - - self.hasBatch = False + + # raw code metrics calculation + self.backgroundService.serviceConnect( + 'radon_raw', 'Python3', path, 'CodeMetricsCalculator', + lambda fn, res: self.metricsCalculationDone("raw", fn, res), + onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy3( + "raw", fx, lang, fn, msg), + onBatchDone=lambda fx, lang: self.batchJobDone( + "raw", fx, lang)) + + # maintainability index calculation + self.backgroundService.serviceConnect( + 'radon_mi', 'Python3', path, 'MaintainabilityIndexCalculator', + lambda fn, res: self.metricsCalculationDone("mi", fn, res), + onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy3( + "mi", fx, lang, fn, msg), + onBatchDone=lambda fx, lang: self.batchJobDone( + "mi", fx, lang)) + + # cyclomatic complexity + self.backgroundService.serviceConnect( + 'radon_cc', 'Python3', path, 'CyclomaticComplexityCalculator', + lambda fn, res: self.metricsCalculationDone("cc", fn, res), + onErrorCallback=lambda fx, lang, fn, msg: self.serviceErrorPy3( + "cc", fx, lang, fn, msg), + onBatchDone=lambda fx, lang: self.batchJobDone( + "cc", fx, lang)) self.queuedBatches = { "raw": [], @@ -197,29 +132,6 @@ """ self.error.emit(type_, fn, msg) - def serviceErrorPy2(self, type_, fx, lang, fn, msg): - """ - Public slot handling service errors for Python 2. - - @param type_ type of the calculated metrics - @type str, one of ["raw", "mi", "cc"] - @param fx service name - @type str - @param lang language - @type str - @param fn file name - @type str - @param msg message text - @type str - """ - if fx in ['radon_' + type_, 'batch_radon_' + type_] and \ - lang == 'Python2': - if fx == 'radon_' + type_: - self.__serviceError(type_, fn, msg) - else: - self.__serviceError(type_, self.tr("Python 2 batch job"), msg) - self.batchJobDone(type_, fx, lang) - def serviceErrorPy3(self, type_, fx, lang, fn, msg): """ Public slot handling service errors for Python 3. @@ -235,8 +147,7 @@ @param msg message text @type str """ - if fx in ['radon_' + type_, 'batch_radon_' + type_] and \ - lang == 'Python3': + if fx in ['radon_' + type_, 'batch_radon_' + type_]: if fx == 'radon_' + type_: self.__serviceError(type_, fn, msg) else: @@ -258,8 +169,10 @@ if lang in self.queuedBatches[type_]: self.queuedBatches[type_].remove(lang) # prevent sending the signal multiple times - if len(self.queuedBatches[type_]) == 0 and \ - not self.batchesFinished[type_]: + if ( + len(self.queuedBatches[type_]) == 0 and + not self.batchesFinished[type_] + ): self.batchFinished.emit(type_) self.batchesFinished[type_] = True @@ -327,11 +240,9 @@ """ if lang is None: lang = 'Python{0}'.format(determinePythonVersion(filename, source)) - if lang not in ['Python2', 'Python3']: - return - - self.backgroundService.enqueueRequest( - 'radon_raw', lang, filename, [source]) + if lang == 'Python3': + self.backgroundService.enqueueRequest( + 'radon_raw', lang, filename, [source]) def rawMetricsBatch(self, argumentsList): """ @@ -343,30 +254,25 @@ @type (str, str) """ data = { - "Python2": [], "Python3": [], } for filename, source in argumentsList: lang = 'Python{0}'.format(determinePythonVersion(filename, source)) - if lang not in ['Python2', 'Python3']: - continue - else: + if lang == 'Python3': data[lang].append((filename, source)) self.queuedBatches["raw"] = [] - for lang in ['Python2', 'Python3']: - if data[lang]: - self.queuedBatches["raw"].append(lang) - self.backgroundService.enqueueRequest('batch_radon_raw', lang, - "", data[lang]) - self.batchesFinished["raw"] = False + if data[lang]: + self.queuedBatches["raw"].append('Python3') + self.backgroundService.enqueueRequest( + 'batch_radon_raw', 'Python3', "", data['Python3']) + self.batchesFinished["raw"] = False def cancelRawMetricsBatch(self): """ Public method to cancel all batch jobs. """ - for lang in ['Python2', 'Python3']: - self.backgroundService.requestCancel('batch_radon_raw', lang) + self.backgroundService.requestCancel('batch_radon_raw', 'Python3') def maintainabilityIndex(self, lang, filename, source): """ @@ -383,11 +289,9 @@ """ if lang is None: lang = 'Python{0}'.format(determinePythonVersion(filename, source)) - if lang not in ['Python2', 'Python3']: - return - - self.backgroundService.enqueueRequest( - 'radon_mi', lang, filename, [source]) + if lang == 'Python3': + self.backgroundService.enqueueRequest( + 'radon_mi', lang, filename, [source]) def maintainabilityIndexBatch(self, argumentsList): """ @@ -399,30 +303,25 @@ @type (str, str) """ data = { - "Python2": [], "Python3": [], } for filename, source in argumentsList: lang = 'Python{0}'.format(determinePythonVersion(filename, source)) - if lang not in ['Python2', 'Python3']: - continue - else: + if lang == 'Python3': data[lang].append((filename, source)) self.queuedBatches["mi"] = [] - for lang in ['Python2', 'Python3']: - if data[lang]: - self.queuedBatches["mi"].append(lang) - self.backgroundService.enqueueRequest('batch_radon_mi', lang, - "", data[lang]) - self.batchesFinished["mi"] = False + if data['Python3']: + self.queuedBatches["mi"].append('Python3') + self.backgroundService.enqueueRequest( + 'batch_radon_mi', 'Python3', "", data['Python3']) + self.batchesFinished["mi"] = False def cancelMaintainabilityIndexBatch(self): """ Public method to cancel all batch jobs. """ - for lang in ['Python2', 'Python3']: - self.backgroundService.requestCancel('batch_radon_mi', lang) + self.backgroundService.requestCancel('batch_radon_mi', 'Python3') def cyclomaticComplexity(self, lang, filename, source): """ @@ -439,11 +338,9 @@ """ if lang is None: lang = 'Python{0}'.format(determinePythonVersion(filename, source)) - if lang not in ['Python2', 'Python3']: - return - - self.backgroundService.enqueueRequest( - 'radon_cc', lang, filename, [source]) + if lang == 'Python3': + self.backgroundService.enqueueRequest( + 'radon_cc', lang, filename, [source]) def cyclomaticComplexityBatch(self, argumentsList): """ @@ -455,30 +352,25 @@ @type (str, str) """ data = { - "Python2": [], "Python3": [], } for filename, source in argumentsList: lang = 'Python{0}'.format(determinePythonVersion(filename, source)) - if lang not in ['Python2', 'Python3']: - continue - else: + if lang == 'Python3': data[lang].append((filename, source)) self.queuedBatches["raw"] = [] - for lang in ['Python2', 'Python3']: - if data[lang]: - self.queuedBatches["cc"].append(lang) - self.backgroundService.enqueueRequest('batch_radon_cc', lang, - "", data[lang]) - self.batchesFinished["cc"] = False + if data['Python3']: + self.queuedBatches["cc"].append('Python3') + self.backgroundService.enqueueRequest( + 'batch_radon_cc', 'Python3', "", data['Python3']) + self.batchesFinished["cc"] = False def cancelComplexityBatch(self): """ Public method to cancel all batch jobs. """ - for lang in ['Python2', 'Python3']: - self.backgroundService.requestCancel('batch_radon_cc', lang) + self.backgroundService.requestCancel('batch_radon_cc', 'Python3') def activate(self): """ @@ -622,8 +514,8 @@ e5App().getObject("Project").showMenu.connect(self.__projectShowMenu) e5App().getObject("Project").projectClosed.connect( self.__projectClosed) - e5App().getObject("ProjectBrowser").getProjectBrowser("sources")\ - .showMenu.connect(self.__projectBrowserShowMenu) + e5App().getObject("ProjectBrowser").getProjectBrowser( + "sources").showMenu.connect(self.__projectBrowserShowMenu) e5App().getObject("ViewManager").editorOpenedEd.connect( self.__editorOpened) e5App().getObject("ViewManager").editorClosedEd.connect( @@ -642,8 +534,8 @@ self.__projectShowMenu) e5App().getObject("Project").projectClosed.disconnect( self.__projectClosed) - e5App().getObject("ProjectBrowser").getProjectBrowser("sources")\ - .showMenu.disconnect(self.__projectBrowserShowMenu) + e5App().getObject("ProjectBrowser").getProjectBrowser( + "sources").showMenu.disconnect(self.__projectBrowserShowMenu) e5App().getObject("ViewManager").editorOpenedEd.disconnect( self.__editorOpened) e5App().getObject("ViewManager").editorClosedEd.disconnect( @@ -708,8 +600,8 @@ if menuName == "Show": for act in self.__projectMetricsActs[1:]: act.setEnabled( - e5App().getObject("Project").getProjectLanguage() in - ["Python3", "Python2", "Python"]) + e5App().getObject("Project").getProjectLanguage() == + "Python3") def __projectBrowserShowMenu(self, menuName, menu): """ @@ -719,9 +611,10 @@ @param menuName name of the menu to be shown (string) @param menu reference to the menu (QMenu) """ - if menuName == "Show" and \ - e5App().getObject("Project").getProjectLanguage() in \ - ["Python3", "Python2", "Python"]: + if ( + menuName == "Show" and + e5App().getObject("Project").getProjectLanguage() == "Python3" + ): if self.__projectBrowserMenu is None: self.__projectBrowserMenu = menu @@ -925,8 +818,9 @@ tuple(Preferences.getPython("PythonExtensions")))] if self.__projectMIDialog is None: - from RadonMetrics.MaintainabilityIndexDialog import \ + from RadonMetrics.MaintainabilityIndexDialog import ( MaintainabilityIndexDialog + ) self.__projectMIDialog = MaintainabilityIndexDialog(self) self.__projectMIDialog.show() self.__projectMIDialog.prepare(files, project) @@ -950,8 +844,9 @@ fn = itm.dirName() if self.__projectBrowserMIDialog is None: - from RadonMetrics.MaintainabilityIndexDialog import \ + from RadonMetrics.MaintainabilityIndexDialog import ( MaintainabilityIndexDialog + ) self.__projectBrowserMIDialog = MaintainabilityIndexDialog(self) self.__projectBrowserMIDialog.show() self.__projectBrowserMIDialog.start(fn) @@ -965,8 +860,9 @@ if editor is not None: if editor.checkDirty() and editor.getFileName() is not None: if self.__editorMIDialog is None: - from RadonMetrics.MaintainabilityIndexDialog import \ + from RadonMetrics.MaintainabilityIndexDialog import ( MaintainabilityIndexDialog + ) self.__editorMIDialog = MaintainabilityIndexDialog(self) self.__editorMIDialog.show() self.__editorMIDialog.start(editor.getFileName()) @@ -990,8 +886,9 @@ tuple(Preferences.getPython("PythonExtensions")))] if self.__projectCCDialog is None: - from RadonMetrics.CyclomaticComplexityDialog import \ + from RadonMetrics.CyclomaticComplexityDialog import ( CyclomaticComplexityDialog + ) self.__projectCCDialog = CyclomaticComplexityDialog(self) self.__projectCCDialog.show() self.__projectCCDialog.prepare(files, project) @@ -1015,8 +912,9 @@ fn = itm.dirName() if self.__projectBrowserCCDialog is None: - from RadonMetrics.CyclomaticComplexityDialog import \ + from RadonMetrics.CyclomaticComplexityDialog import ( CyclomaticComplexityDialog + ) self.__projectBrowserCCDialog = CyclomaticComplexityDialog( self, isSingle=True) self.__projectBrowserCCDialog.show() @@ -1031,8 +929,9 @@ if editor is not None: if editor.checkDirty() and editor.getFileName() is not None: if self.__editorCCDialog is None: - from RadonMetrics.CyclomaticComplexityDialog import \ + from RadonMetrics.CyclomaticComplexityDialog import ( CyclomaticComplexityDialog + ) self.__editorCCDialog = CyclomaticComplexityDialog( self, isSingle=True) self.__editorCCDialog.show() @@ -1074,7 +973,7 @@ """ self.__projectCCDialog and self.__projectCCDialog.clear() self.__projectMIDialog and self.__projectMIDialog.clear() - self.__projectRawMetricsDialog and \ + if self.__projectRawMetricsDialog: self.__projectRawMetricsDialog.clear() #
--- a/RadonMetrics/CodeMetricsCalculator.py Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/CodeMetricsCalculator.py Tue Jun 23 19:05:15 2020 +0200 @@ -7,18 +7,7 @@ Module implementing the raw code metrics service. """ -from __future__ import unicode_literals - -try: - str = unicode # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ -except NameError: - pass - -try: - import Queue as queue # Py2 -except ImportError: - import queue - +import queue import multiprocessing @@ -91,8 +80,8 @@ # Start worker processes for _ in range(NumberOfProcesses): - multiprocessing.Process(target=worker, args=(taskQueue, doneQueue))\ - .start() + multiprocessing.Process( + target=worker, args=(taskQueue, doneQueue)).start() # Get and send results endIndex = len(argumentsList) - initialTasks
--- a/RadonMetrics/CyclomaticComplexityCalculator.py Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/CyclomaticComplexityCalculator.py Tue Jun 23 19:05:15 2020 +0200 @@ -7,19 +7,7 @@ Module implementing the cyclomatic complexity service. """ -from __future__ import unicode_literals - -try: - str = unicode # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ -except NameError: - pass - -try: - import Queue as queue # Py2 -except ImportError: - import queue - -import sys +import queue import multiprocessing @@ -95,8 +83,8 @@ # Start worker processes for _ in range(NumberOfProcesses): - multiprocessing.Process(target=worker, args=(taskQueue, doneQueue))\ - .start() + multiprocessing.Process( + target=worker, args=(taskQueue, doneQueue)).start() # Get and send results endIndex = len(argumentsList) - initialTasks @@ -157,13 +145,6 @@ """ from radon.complexity import cc_visit, cc_rank - # Check type for py2: if not str it's unicode - if sys.version_info[0] == 2: - try: - text = text.encode('utf-8') - except UnicodeError: - pass - try: cc = cc_visit(text) res = {"result": [v for v in map(__cc2Dict, cc) @@ -205,7 +186,7 @@ 'type': __getType(obj), 'rank': cc_rank(obj.complexity), } - attrs = set(Function._fields) - set(('is_method', 'closures')) + attrs = set(Function._fields) - {'is_method', 'closures'} attrs.add("fullname") for attr in attrs: v = getattr(obj, attr, None)
--- a/RadonMetrics/CyclomaticComplexityDialog.py Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/CyclomaticComplexityDialog.py Tue Jun 23 19:05:15 2020 +0200 @@ -8,13 +8,6 @@ complexity). """ -from __future__ import unicode_literals - -try: - str = unicode # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ -except NameError: - pass - import os import fnmatch import sys @@ -310,7 +303,7 @@ # now go through all the files self.progress = 0 - if len(self.files) == 1 or not self.radonService.hasBatch: + if len(self.files) == 1: self.__batch = False self.cyclomaticComplexity() else: @@ -553,20 +546,24 @@ dataChanged = False filterString = self.excludeFilesEdit.text() - if "ExcludeFiles" not in self.__data or \ - filterString != self.__data["ExcludeFiles"]: + if ( + "ExcludeFiles" not in self.__data or + filterString != self.__data["ExcludeFiles"] + ): self.__data["ExcludeFiles"] = filterString dataChanged = True filterList = [f.strip() for f in filterString.split(",") if f.strip()] if filterList: for fileFilter in filterList: - fileList = \ - [f for f in fileList if not fnmatch.fnmatch(f, fileFilter)] + fileList = [f for f in fileList + if not fnmatch.fnmatch(f, fileFilter)] minimumRank = self.rankComboBox.currentText() - if "MinimumRank" not in self.__data or \ - minimumRank != self.__data["MinimumRank"]: + if ( + "MinimumRank" not in self.__data or + minimumRank != self.__data["MinimumRank"] + ): self.__data["MinimumRank"] = minimumRank dataChanged = True
--- a/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.PluginMetricsRadon.html Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.PluginMetricsRadon.html Tue Jun 23 19:05:15 2020 +0200 @@ -18,48 +18,62 @@ </style> </head> -<body><a NAME="top" ID="top"></a> +<body> +<a NAME="top" ID="top"></a> <h1>Plugin_Metrics_Radon.PluginMetricsRadon</h1> + <p> Module implementing the radon code metrics plug-in. </p> <h3>Global Attributes</h3> + <table> -<tr><td>author</td></tr><tr><td>autoactivate</td></tr><tr><td>className</td></tr><tr><td>deactivateable</td></tr><tr><td>error</td></tr><tr><td>longDescription</td></tr><tr><td>name</td></tr><tr><td>needsRestart</td></tr><tr><td>packageName</td></tr><tr><td>pyqtApi</td></tr><tr><td>python2Compatible</td></tr><tr><td>shortDescription</td></tr><tr><td>version</td></tr> +<tr><td>author</td></tr><tr><td>autoactivate</td></tr><tr><td>className</td></tr><tr><td>deactivateable</td></tr><tr><td>error</td></tr><tr><td>longDescription</td></tr><tr><td>name</td></tr><tr><td>needsRestart</td></tr><tr><td>packageName</td></tr><tr><td>pyqtApi</td></tr><tr><td>shortDescription</td></tr><tr><td>version</td></tr> </table> <h3>Classes</h3> + <table> + <tr> <td><a href="#RadonMetricsPlugin">RadonMetricsPlugin</a></td> <td>Class implementing the radon code metrics plug-in.</td> </tr> </table> <h3>Functions</h3> + <table> <tr><td>None</td></tr> </table> -<hr /><hr /> +<hr /> +<hr /> <a NAME="RadonMetricsPlugin" ID="RadonMetricsPlugin"></a> <h2>RadonMetricsPlugin</h2> + <p> Class implementing the radon code metrics plug-in. -</p><h3>Signals</h3> +</p> +<h3>Signals</h3> <dl> + <dt>batchFinished(str)</dt> <dd> emitted when a code metrics batch is done -</dd><dt>complexityDone(str, dict)</dt> +</dd> +<dt>complexityDone(str, dict)</dt> <dd> emitted when the cyclomatic complexity was determined for a file -</dd><dt>error(str, str, str)</dt> +</dd> +<dt>error(str, str, str)</dt> <dd> emitted in case of an error -</dd><dt>maintainabilityIndexDone(str, dict)</dt> +</dd> +<dt>maintainabilityIndexDone(str, dict)</dt> <dd> emitted when the maintainability index was determined for a file -</dd><dt>metricsDone(str, dict)</dt> +</dd> +<dt>metricsDone(str, dict)</dt> <dd> emitted when the code metrics were determined for a file @@ -68,501 +82,641 @@ <h3>Derived from</h3> QObject <h3>Class Attributes</h3> + <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> + <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> + <table> + <tr> <td><a href="#RadonMetricsPlugin.__init__">RadonMetricsPlugin</a></td> <td>Constructor</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__editorClosed">__editorClosed</a></td> <td>Private slot called, when an editor was closed.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__editorCyclomaticComplexity">__editorCyclomaticComplexity</a></td> <td>Private slot to handle the cyclomatic complexity action of the editor show menu.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__editorMaintainabilityIndex">__editorMaintainabilityIndex</a></td> <td>Private slot to handle the maintainability index action of the editor show menu.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__editorOpened">__editorOpened</a></td> <td>Private slot called, when a new editor was opened.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__editorRawMetrics">__editorRawMetrics</a></td> <td>Private slot to handle the raw code metrics action of the editor show menu.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__editorRenamed">__editorRenamed</a></td> <td>Private slot called, when an editor was renamed.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__editorShowMenu">__editorShowMenu</a></td> <td>Private slot called, when the the editor context menu or a submenu is about to be shown.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__initialize">__initialize</a></td> <td>Private slot to (re)initialize the plugin.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__loadTranslator">__loadTranslator</a></td> <td>Private method to load the translation file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__projectBrowserCyclomaticComplexity">__projectBrowserCyclomaticComplexity</a></td> <td>Private method to handle the cyclomatic complexity context menu action of the project sources browser.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__projectBrowserMaintainabilityIndex">__projectBrowserMaintainabilityIndex</a></td> <td>Private method to handle the maintainability index context menu action of the project sources browser.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__projectBrowserRawMetrics">__projectBrowserRawMetrics</a></td> <td>Private method to handle the code metrics context menu action of the project sources browser.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__projectBrowserShowMenu">__projectBrowserShowMenu</a></td> <td>Private slot called, when the the project browser context menu or a submenu is about to be shown.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__projectClosed">__projectClosed</a></td> <td>Private slot to handle closing a project.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__projectCyclomaticComplexity">__projectCyclomaticComplexity</a></td> <td>Private slot used to calculate the cyclomatic complexity for the project.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__projectMaintainabilityIndex">__projectMaintainabilityIndex</a></td> <td>Private slot used to calculate the maintainability indexes for the project.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__projectRawMetrics">__projectRawMetrics</a></td> <td>Private slot used to calculate raw code metrics for the project.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__projectShowMenu">__projectShowMenu</a></td> <td>Private slot called, when the the project menu or a submenu is about to be shown.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__serviceError">__serviceError</a></td> <td>Private slot handling service errors.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.__showRadonVersion">__showRadonVersion</a></td> <td>Private slot to show the version number of the used radon library.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.activate">activate</a></td> <td>Public method to activate this plug-in.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.batchJobDone">batchJobDone</a></td> <td>Public slot handling the completion of a batch job.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.cancelComplexityBatch">cancelComplexityBatch</a></td> <td>Public method to cancel all batch jobs.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.cancelMaintainabilityIndexBatch">cancelMaintainabilityIndexBatch</a></td> <td>Public method to cancel all batch jobs.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.cancelRawMetricsBatch">cancelRawMetricsBatch</a></td> <td>Public method to cancel all batch jobs.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.cyclomaticComplexity">cyclomaticComplexity</a></td> <td>Public method to prepare cyclomatic complexity calculation on one Python source file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.cyclomaticComplexityBatch">cyclomaticComplexityBatch</a></td> <td>Public method to prepare cyclomatic complexity calculation on multiple Python source files.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.deactivate">deactivate</a></td> <td>Public method to deactivate this plug-in.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.maintainabilityIndex">maintainabilityIndex</a></td> <td>Public method to prepare maintainability index calculation on one Python source file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.maintainabilityIndexBatch">maintainabilityIndexBatch</a></td> <td>Public method to prepare maintainability index calculation on multiple Python source files.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.metricsCalculationDone">metricsCalculationDone</a></td> <td>Public slot to dispatch the result.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.rawMetrics">rawMetrics</a></td> <td>Public method to prepare raw code metrics calculation on one Python source file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.rawMetricsBatch">rawMetricsBatch</a></td> <td>Public method to prepare raw code metrics calculation on multiple Python source files.</td> -</tr><tr> -<td><a href="#RadonMetricsPlugin.serviceErrorPy2">serviceErrorPy2</a></td> -<td>Public slot handling service errors for Python 2.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RadonMetricsPlugin.serviceErrorPy3">serviceErrorPy3</a></td> <td>Public slot handling service errors for Python 3.</td> </tr> </table> <h3>Static Methods</h3> + <table> <tr><td>None</td></tr> </table> + <a NAME="RadonMetricsPlugin.__init__" ID="RadonMetricsPlugin.__init__"></a> <h4>RadonMetricsPlugin (Constructor)</h4> <b>RadonMetricsPlugin</b>(<i>ui</i>) + <p> Constructor -</p><dl> +</p> +<dl> + <dt><i>ui</i> (UI.UserInterface)</dt> <dd> reference to the user interface object </dd> -</dl><a NAME="RadonMetricsPlugin.__editorClosed" ID="RadonMetricsPlugin.__editorClosed"></a> +</dl> +<a NAME="RadonMetricsPlugin.__editorClosed" ID="RadonMetricsPlugin.__editorClosed"></a> <h4>RadonMetricsPlugin.__editorClosed</h4> <b>__editorClosed</b>(<i>editor</i>) + <p> Private slot called, when an editor was closed. -</p><dl> +</p> +<dl> + <dt><i>editor</i></dt> <dd> reference to the editor (QScintilla.Editor) </dd> -</dl><a NAME="RadonMetricsPlugin.__editorCyclomaticComplexity" ID="RadonMetricsPlugin.__editorCyclomaticComplexity"></a> +</dl> +<a NAME="RadonMetricsPlugin.__editorCyclomaticComplexity" ID="RadonMetricsPlugin.__editorCyclomaticComplexity"></a> <h4>RadonMetricsPlugin.__editorCyclomaticComplexity</h4> <b>__editorCyclomaticComplexity</b>(<i></i>) + <p> Private slot to handle the cyclomatic complexity action of the editor show menu. -</p><a NAME="RadonMetricsPlugin.__editorMaintainabilityIndex" ID="RadonMetricsPlugin.__editorMaintainabilityIndex"></a> +</p> +<a NAME="RadonMetricsPlugin.__editorMaintainabilityIndex" ID="RadonMetricsPlugin.__editorMaintainabilityIndex"></a> <h4>RadonMetricsPlugin.__editorMaintainabilityIndex</h4> <b>__editorMaintainabilityIndex</b>(<i></i>) + <p> Private slot to handle the maintainability index action of the editor show menu. -</p><a NAME="RadonMetricsPlugin.__editorOpened" ID="RadonMetricsPlugin.__editorOpened"></a> +</p> +<a NAME="RadonMetricsPlugin.__editorOpened" ID="RadonMetricsPlugin.__editorOpened"></a> <h4>RadonMetricsPlugin.__editorOpened</h4> <b>__editorOpened</b>(<i>editor</i>) + <p> Private slot called, when a new editor was opened. -</p><dl> +</p> +<dl> + <dt><i>editor</i> (QScintilla.Editor)</dt> <dd> reference to the new editor </dd> -</dl><a NAME="RadonMetricsPlugin.__editorRawMetrics" ID="RadonMetricsPlugin.__editorRawMetrics"></a> +</dl> +<a NAME="RadonMetricsPlugin.__editorRawMetrics" ID="RadonMetricsPlugin.__editorRawMetrics"></a> <h4>RadonMetricsPlugin.__editorRawMetrics</h4> <b>__editorRawMetrics</b>(<i></i>) + <p> Private slot to handle the raw code metrics action of the editor show menu. -</p><a NAME="RadonMetricsPlugin.__editorRenamed" ID="RadonMetricsPlugin.__editorRenamed"></a> +</p> +<a NAME="RadonMetricsPlugin.__editorRenamed" ID="RadonMetricsPlugin.__editorRenamed"></a> <h4>RadonMetricsPlugin.__editorRenamed</h4> <b>__editorRenamed</b>(<i>editor</i>) + <p> Private slot called, when an editor was renamed. -</p><dl> +</p> +<dl> + <dt><i>editor</i> (QScintilla.Editor)</dt> <dd> reference to the renamed editor </dd> -</dl><a NAME="RadonMetricsPlugin.__editorShowMenu" ID="RadonMetricsPlugin.__editorShowMenu"></a> +</dl> +<a NAME="RadonMetricsPlugin.__editorShowMenu" ID="RadonMetricsPlugin.__editorShowMenu"></a> <h4>RadonMetricsPlugin.__editorShowMenu</h4> <b>__editorShowMenu</b>(<i>menuName, menu, editor</i>) + <p> Private slot called, when the the editor context menu or a submenu is about to be shown. -</p><dl> +</p> +<dl> + <dt><i>menuName</i></dt> <dd> name of the menu to be shown (string) -</dd><dt><i>menu</i></dt> +</dd> +<dt><i>menu</i></dt> <dd> reference to the menu (QMenu) -</dd><dt><i>editor</i></dt> +</dd> +<dt><i>editor</i></dt> <dd> reference to the editor </dd> -</dl><a NAME="RadonMetricsPlugin.__initialize" ID="RadonMetricsPlugin.__initialize"></a> +</dl> +<a NAME="RadonMetricsPlugin.__initialize" ID="RadonMetricsPlugin.__initialize"></a> <h4>RadonMetricsPlugin.__initialize</h4> <b>__initialize</b>(<i></i>) + <p> Private slot to (re)initialize the plugin. -</p><a NAME="RadonMetricsPlugin.__loadTranslator" ID="RadonMetricsPlugin.__loadTranslator"></a> +</p> +<a NAME="RadonMetricsPlugin.__loadTranslator" ID="RadonMetricsPlugin.__loadTranslator"></a> <h4>RadonMetricsPlugin.__loadTranslator</h4> <b>__loadTranslator</b>(<i></i>) + <p> Private method to load the translation file. -</p><a NAME="RadonMetricsPlugin.__projectBrowserCyclomaticComplexity" ID="RadonMetricsPlugin.__projectBrowserCyclomaticComplexity"></a> +</p> +<a NAME="RadonMetricsPlugin.__projectBrowserCyclomaticComplexity" ID="RadonMetricsPlugin.__projectBrowserCyclomaticComplexity"></a> <h4>RadonMetricsPlugin.__projectBrowserCyclomaticComplexity</h4> <b>__projectBrowserCyclomaticComplexity</b>(<i></i>) + <p> Private method to handle the cyclomatic complexity context menu action of the project sources browser. -</p><a NAME="RadonMetricsPlugin.__projectBrowserMaintainabilityIndex" ID="RadonMetricsPlugin.__projectBrowserMaintainabilityIndex"></a> +</p> +<a NAME="RadonMetricsPlugin.__projectBrowserMaintainabilityIndex" ID="RadonMetricsPlugin.__projectBrowserMaintainabilityIndex"></a> <h4>RadonMetricsPlugin.__projectBrowserMaintainabilityIndex</h4> <b>__projectBrowserMaintainabilityIndex</b>(<i></i>) + <p> Private method to handle the maintainability index context menu action of the project sources browser. -</p><a NAME="RadonMetricsPlugin.__projectBrowserRawMetrics" ID="RadonMetricsPlugin.__projectBrowserRawMetrics"></a> +</p> +<a NAME="RadonMetricsPlugin.__projectBrowserRawMetrics" ID="RadonMetricsPlugin.__projectBrowserRawMetrics"></a> <h4>RadonMetricsPlugin.__projectBrowserRawMetrics</h4> <b>__projectBrowserRawMetrics</b>(<i></i>) + <p> Private method to handle the code metrics context menu action of the project sources browser. -</p><a NAME="RadonMetricsPlugin.__projectBrowserShowMenu" ID="RadonMetricsPlugin.__projectBrowserShowMenu"></a> +</p> +<a NAME="RadonMetricsPlugin.__projectBrowserShowMenu" ID="RadonMetricsPlugin.__projectBrowserShowMenu"></a> <h4>RadonMetricsPlugin.__projectBrowserShowMenu</h4> <b>__projectBrowserShowMenu</b>(<i>menuName, menu</i>) + <p> Private slot called, when the the project browser context menu or a submenu is about to be shown. -</p><dl> +</p> +<dl> + <dt><i>menuName</i></dt> <dd> name of the menu to be shown (string) -</dd><dt><i>menu</i></dt> +</dd> +<dt><i>menu</i></dt> <dd> reference to the menu (QMenu) </dd> -</dl><a NAME="RadonMetricsPlugin.__projectClosed" ID="RadonMetricsPlugin.__projectClosed"></a> +</dl> +<a NAME="RadonMetricsPlugin.__projectClosed" ID="RadonMetricsPlugin.__projectClosed"></a> <h4>RadonMetricsPlugin.__projectClosed</h4> <b>__projectClosed</b>(<i></i>) + <p> Private slot to handle closing a project. -</p><a NAME="RadonMetricsPlugin.__projectCyclomaticComplexity" ID="RadonMetricsPlugin.__projectCyclomaticComplexity"></a> +</p> +<a NAME="RadonMetricsPlugin.__projectCyclomaticComplexity" ID="RadonMetricsPlugin.__projectCyclomaticComplexity"></a> <h4>RadonMetricsPlugin.__projectCyclomaticComplexity</h4> <b>__projectCyclomaticComplexity</b>(<i></i>) + <p> Private slot used to calculate the cyclomatic complexity for the project. -</p><a NAME="RadonMetricsPlugin.__projectMaintainabilityIndex" ID="RadonMetricsPlugin.__projectMaintainabilityIndex"></a> +</p> +<a NAME="RadonMetricsPlugin.__projectMaintainabilityIndex" ID="RadonMetricsPlugin.__projectMaintainabilityIndex"></a> <h4>RadonMetricsPlugin.__projectMaintainabilityIndex</h4> <b>__projectMaintainabilityIndex</b>(<i></i>) + <p> Private slot used to calculate the maintainability indexes for the project. -</p><a NAME="RadonMetricsPlugin.__projectRawMetrics" ID="RadonMetricsPlugin.__projectRawMetrics"></a> +</p> +<a NAME="RadonMetricsPlugin.__projectRawMetrics" ID="RadonMetricsPlugin.__projectRawMetrics"></a> <h4>RadonMetricsPlugin.__projectRawMetrics</h4> <b>__projectRawMetrics</b>(<i></i>) + <p> Private slot used to calculate raw code metrics for the project. -</p><a NAME="RadonMetricsPlugin.__projectShowMenu" ID="RadonMetricsPlugin.__projectShowMenu"></a> +</p> +<a NAME="RadonMetricsPlugin.__projectShowMenu" ID="RadonMetricsPlugin.__projectShowMenu"></a> <h4>RadonMetricsPlugin.__projectShowMenu</h4> <b>__projectShowMenu</b>(<i>menuName, menu</i>) + <p> Private slot called, when the the project menu or a submenu is about to be shown. -</p><dl> +</p> +<dl> + <dt><i>menuName</i> (str)</dt> <dd> name of the menu to be shown -</dd><dt><i>menu</i> (QMenu)</dt> +</dd> +<dt><i>menu</i> (QMenu)</dt> <dd> reference to the menu </dd> -</dl><a NAME="RadonMetricsPlugin.__serviceError" ID="RadonMetricsPlugin.__serviceError"></a> +</dl> +<a NAME="RadonMetricsPlugin.__serviceError" ID="RadonMetricsPlugin.__serviceError"></a> <h4>RadonMetricsPlugin.__serviceError</h4> <b>__serviceError</b>(<i>type_, fn, msg</i>) + <p> Private slot handling service errors. -</p><dl> +</p> +<dl> + <dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt> <dd> type of the calculated metrics -</dd><dt><i>fn</i> (str)</dt> +</dd> +<dt><i>fn</i> (str)</dt> <dd> file name -</dd><dt><i>msg</i> (str)</dt> +</dd> +<dt><i>msg</i> (str)</dt> <dd> message text </dd> -</dl><a NAME="RadonMetricsPlugin.__showRadonVersion" ID="RadonMetricsPlugin.__showRadonVersion"></a> +</dl> +<a NAME="RadonMetricsPlugin.__showRadonVersion" ID="RadonMetricsPlugin.__showRadonVersion"></a> <h4>RadonMetricsPlugin.__showRadonVersion</h4> <b>__showRadonVersion</b>(<i></i>) + <p> Private slot to show the version number of the used radon library. -</p><a NAME="RadonMetricsPlugin.activate" ID="RadonMetricsPlugin.activate"></a> +</p> +<a NAME="RadonMetricsPlugin.activate" ID="RadonMetricsPlugin.activate"></a> <h4>RadonMetricsPlugin.activate</h4> <b>activate</b>(<i></i>) + <p> Public method to activate this plug-in. -</p><dl> +</p> +<dl> <dt>Returns:</dt> <dd> tuple of None and activation status </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> (None, bool) </dd> -</dl><a NAME="RadonMetricsPlugin.batchJobDone" ID="RadonMetricsPlugin.batchJobDone"></a> +</dl> +<a NAME="RadonMetricsPlugin.batchJobDone" ID="RadonMetricsPlugin.batchJobDone"></a> <h4>RadonMetricsPlugin.batchJobDone</h4> <b>batchJobDone</b>(<i>type_, fx, lang</i>) + <p> Public slot handling the completion of a batch job. -</p><dl> +</p> +<dl> + <dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt> <dd> type of the calculated metrics -</dd><dt><i>fx</i> (str)</dt> +</dd> +<dt><i>fx</i> (str)</dt> <dd> service name -</dd><dt><i>lang</i> (str)</dt> +</dd> +<dt><i>lang</i> (str)</dt> <dd> language </dd> -</dl><a NAME="RadonMetricsPlugin.cancelComplexityBatch" ID="RadonMetricsPlugin.cancelComplexityBatch"></a> +</dl> +<a NAME="RadonMetricsPlugin.cancelComplexityBatch" ID="RadonMetricsPlugin.cancelComplexityBatch"></a> <h4>RadonMetricsPlugin.cancelComplexityBatch</h4> <b>cancelComplexityBatch</b>(<i></i>) + <p> Public method to cancel all batch jobs. -</p><a NAME="RadonMetricsPlugin.cancelMaintainabilityIndexBatch" ID="RadonMetricsPlugin.cancelMaintainabilityIndexBatch"></a> +</p> +<a NAME="RadonMetricsPlugin.cancelMaintainabilityIndexBatch" ID="RadonMetricsPlugin.cancelMaintainabilityIndexBatch"></a> <h4>RadonMetricsPlugin.cancelMaintainabilityIndexBatch</h4> <b>cancelMaintainabilityIndexBatch</b>(<i></i>) + <p> Public method to cancel all batch jobs. -</p><a NAME="RadonMetricsPlugin.cancelRawMetricsBatch" ID="RadonMetricsPlugin.cancelRawMetricsBatch"></a> +</p> +<a NAME="RadonMetricsPlugin.cancelRawMetricsBatch" ID="RadonMetricsPlugin.cancelRawMetricsBatch"></a> <h4>RadonMetricsPlugin.cancelRawMetricsBatch</h4> <b>cancelRawMetricsBatch</b>(<i></i>) + <p> Public method to cancel all batch jobs. -</p><a NAME="RadonMetricsPlugin.cyclomaticComplexity" ID="RadonMetricsPlugin.cyclomaticComplexity"></a> +</p> +<a NAME="RadonMetricsPlugin.cyclomaticComplexity" ID="RadonMetricsPlugin.cyclomaticComplexity"></a> <h4>RadonMetricsPlugin.cyclomaticComplexity</h4> <b>cyclomaticComplexity</b>(<i>lang, filename, source</i>) + <p> Public method to prepare cyclomatic complexity calculation on one Python source file. -</p><dl> +</p> +<dl> + <dt><i>lang</i> (str or None)</dt> <dd> language of the file or None to determine by internal algorithm -</dd><dt><i>filename</i> (str)</dt> +</dd> +<dt><i>filename</i> (str)</dt> <dd> source filename -</dd><dt><i>source</i> (str)</dt> +</dd> +<dt><i>source</i> (str)</dt> <dd> string containing the code </dd> -</dl><a NAME="RadonMetricsPlugin.cyclomaticComplexityBatch" ID="RadonMetricsPlugin.cyclomaticComplexityBatch"></a> +</dl> +<a NAME="RadonMetricsPlugin.cyclomaticComplexityBatch" ID="RadonMetricsPlugin.cyclomaticComplexityBatch"></a> <h4>RadonMetricsPlugin.cyclomaticComplexityBatch</h4> <b>cyclomaticComplexityBatch</b>(<i>argumentsList</i>) + <p> Public method to prepare cyclomatic complexity calculation on multiple Python source files. -</p><dl> +</p> +<dl> + <dt><i>argumentsList</i> ((str, str))</dt> <dd> list of arguments tuples with each tuple containing filename and source </dd> -</dl><a NAME="RadonMetricsPlugin.deactivate" ID="RadonMetricsPlugin.deactivate"></a> +</dl> +<a NAME="RadonMetricsPlugin.deactivate" ID="RadonMetricsPlugin.deactivate"></a> <h4>RadonMetricsPlugin.deactivate</h4> <b>deactivate</b>(<i></i>) + <p> Public method to deactivate this plug-in. -</p><a NAME="RadonMetricsPlugin.maintainabilityIndex" ID="RadonMetricsPlugin.maintainabilityIndex"></a> +</p> +<a NAME="RadonMetricsPlugin.maintainabilityIndex" ID="RadonMetricsPlugin.maintainabilityIndex"></a> <h4>RadonMetricsPlugin.maintainabilityIndex</h4> <b>maintainabilityIndex</b>(<i>lang, filename, source</i>) + <p> Public method to prepare maintainability index calculation on one Python source file. -</p><dl> +</p> +<dl> + <dt><i>lang</i> (str or None)</dt> <dd> language of the file or None to determine by internal algorithm -</dd><dt><i>filename</i> (str)</dt> +</dd> +<dt><i>filename</i> (str)</dt> <dd> source filename -</dd><dt><i>source</i> (str)</dt> +</dd> +<dt><i>source</i> (str)</dt> <dd> string containing the code </dd> -</dl><a NAME="RadonMetricsPlugin.maintainabilityIndexBatch" ID="RadonMetricsPlugin.maintainabilityIndexBatch"></a> +</dl> +<a NAME="RadonMetricsPlugin.maintainabilityIndexBatch" ID="RadonMetricsPlugin.maintainabilityIndexBatch"></a> <h4>RadonMetricsPlugin.maintainabilityIndexBatch</h4> <b>maintainabilityIndexBatch</b>(<i>argumentsList</i>) + <p> Public method to prepare maintainability index calculation on multiple Python source files. -</p><dl> +</p> +<dl> + <dt><i>argumentsList</i> ((str, str))</dt> <dd> list of arguments tuples with each tuple containing filename and source </dd> -</dl><a NAME="RadonMetricsPlugin.metricsCalculationDone" ID="RadonMetricsPlugin.metricsCalculationDone"></a> +</dl> +<a NAME="RadonMetricsPlugin.metricsCalculationDone" ID="RadonMetricsPlugin.metricsCalculationDone"></a> <h4>RadonMetricsPlugin.metricsCalculationDone</h4> <b>metricsCalculationDone</b>(<i>type_, filename, result</i>) + <p> Public slot to dispatch the result. -</p><dl> +</p> +<dl> + <dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt> <dd> type of the calculated metrics -</dd><dt><i>filename</i> (str)</dt> +</dd> +<dt><i>filename</i> (str)</dt> <dd> name of the file the results belong to -</dd><dt><i>result</i> (dict)</dt> +</dd> +<dt><i>result</i> (dict)</dt> <dd> result dictionary </dd> -</dl><a NAME="RadonMetricsPlugin.rawMetrics" ID="RadonMetricsPlugin.rawMetrics"></a> +</dl> +<a NAME="RadonMetricsPlugin.rawMetrics" ID="RadonMetricsPlugin.rawMetrics"></a> <h4>RadonMetricsPlugin.rawMetrics</h4> <b>rawMetrics</b>(<i>lang, filename, source</i>) + <p> Public method to prepare raw code metrics calculation on one Python source file. -</p><dl> +</p> +<dl> + <dt><i>lang</i> (str or None)</dt> <dd> language of the file or None to determine by internal algorithm -</dd><dt><i>filename</i> (str)</dt> +</dd> +<dt><i>filename</i> (str)</dt> <dd> source filename -</dd><dt><i>source</i> (str)</dt> +</dd> +<dt><i>source</i> (str)</dt> <dd> string containing the code </dd> -</dl><a NAME="RadonMetricsPlugin.rawMetricsBatch" ID="RadonMetricsPlugin.rawMetricsBatch"></a> +</dl> +<a NAME="RadonMetricsPlugin.rawMetricsBatch" ID="RadonMetricsPlugin.rawMetricsBatch"></a> <h4>RadonMetricsPlugin.rawMetricsBatch</h4> <b>rawMetricsBatch</b>(<i>argumentsList</i>) + <p> Public method to prepare raw code metrics calculation on multiple Python source files. -</p><dl> +</p> +<dl> + <dt><i>argumentsList</i> ((str, str))</dt> <dd> list of arguments tuples with each tuple containing filename and source </dd> -</dl><a NAME="RadonMetricsPlugin.serviceErrorPy2" ID="RadonMetricsPlugin.serviceErrorPy2"></a> -<h4>RadonMetricsPlugin.serviceErrorPy2</h4> -<b>serviceErrorPy2</b>(<i>type_, fx, lang, fn, msg</i>) +</dl> +<a NAME="RadonMetricsPlugin.serviceErrorPy3" ID="RadonMetricsPlugin.serviceErrorPy3"></a> +<h4>RadonMetricsPlugin.serviceErrorPy3</h4> +<b>serviceErrorPy3</b>(<i>type_, fx, lang, fn, msg</i>) + <p> - Public slot handling service errors for Python 2. -</p><dl> + Public slot handling service errors for Python 3. +</p> +<dl> + <dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt> <dd> type of the calculated metrics -</dd><dt><i>fx</i> (str)</dt> +</dd> +<dt><i>fx</i> (str)</dt> <dd> service name -</dd><dt><i>lang</i> (str)</dt> +</dd> +<dt><i>lang</i> (str)</dt> <dd> language -</dd><dt><i>fn</i> (str)</dt> +</dd> +<dt><i>fn</i> (str)</dt> <dd> file name -</dd><dt><i>msg</i> (str)</dt> -<dd> -message text </dd> -</dl><a NAME="RadonMetricsPlugin.serviceErrorPy3" ID="RadonMetricsPlugin.serviceErrorPy3"></a> -<h4>RadonMetricsPlugin.serviceErrorPy3</h4> -<b>serviceErrorPy3</b>(<i>type_, fx, lang, fn, msg</i>) -<p> - Public slot handling service errors for Python 3. -</p><dl> -<dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt> -<dd> -type of the calculated metrics -</dd><dt><i>fx</i> (str)</dt> -<dd> -service name -</dd><dt><i>lang</i> (str)</dt> -<dd> -language -</dd><dt><i>fn</i> (str)</dt> -<dd> -file name -</dd><dt><i>msg</i> (str)</dt> +<dt><i>msg</i> (str)</dt> <dd> message text </dd>
--- a/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.CodeMetricsCalculator.html Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.CodeMetricsCalculator.html Tue Jun 23 19:05:15 2020 +0200 @@ -18,183 +18,234 @@ </style> </head> -<body><a NAME="top" ID="top"></a> +<body> +<a NAME="top" ID="top"></a> <h1>Plugin_Metrics_Radon.RadonMetrics.CodeMetricsCalculator</h1> + <p> Module implementing the raw code metrics service. </p> <h3>Global Attributes</h3> + <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> + <table> <tr><td>None</td></tr> </table> <h3>Functions</h3> + <table> + <tr> <td><a href="#__raw2Dict">__raw2Dict</a></td> <td>Private function to convert an object holding raw analysis results into a dictionary.</td> -</tr><tr> +</tr> +<tr> <td><a href="#__rawCodeMetrics">__rawCodeMetrics</a></td> <td>Private function to calculate the raw code metrics for one Python file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#batchRawCodeMetrics">batchRawCodeMetrics</a></td> <td>Module function to calculate the raw code metrics for a batch of files.</td> -</tr><tr> +</tr> +<tr> <td><a href="#initBatchService">initBatchService</a></td> <td>Initialize the batch service and return the entry point.</td> -</tr><tr> +</tr> +<tr> <td><a href="#initService">initService</a></td> <td>Initialize the service and return the entry point.</td> -</tr><tr> +</tr> +<tr> <td><a href="#rawCodeMetrics">rawCodeMetrics</a></td> <td>Private function to calculate the raw code metrics of one file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#worker">worker</a></td> <td>Module function acting as the parallel worker for the raw code metrics calculation.</td> </tr> </table> -<hr /><hr /> +<hr /> +<hr /> <a NAME="__raw2Dict" ID="__raw2Dict"></a> <h2>__raw2Dict</h2> <b>__raw2Dict</b>(<i>obj</i>) + <p> Private function to convert an object holding raw analysis results into a dictionary. -</p><dl> +</p> +<dl> + <dt><i>obj</i> (radon.raw.Module)</dt> <dd> object as returned from analyze() </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> conversion result </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> dict </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="__rawCodeMetrics" ID="__rawCodeMetrics"></a> <h2>__rawCodeMetrics</h2> <b>__rawCodeMetrics</b>(<i>file, text=""</i>) + <p> Private function to calculate the raw code metrics for one Python file. -</p><dl> +</p> +<dl> + <dt><i>file</i> (str)</dt> <dd> source filename -</dd><dt><i>text</i> (str)</dt> +</dd> +<dt><i>text</i> (str)</dt> <dd> source text </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> tuple containing the result dictionary </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> (tuple of dict) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="batchRawCodeMetrics" ID="batchRawCodeMetrics"></a> <h2>batchRawCodeMetrics</h2> <b>batchRawCodeMetrics</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>) + <p> Module function to calculate the raw code metrics for a batch of files. -</p><dl> +</p> +<dl> + <dt><i>argumentsList</i> (list)</dt> <dd> list of arguments tuples as given for rawCodeMetrics -</dd><dt><i>send</i> (function)</dt> +</dd> +<dt><i>send</i> (function)</dt> <dd> reference to send function -</dd><dt><i>fx</i> (str)</dt> +</dd> +<dt><i>fx</i> (str)</dt> <dd> registered service name -</dd><dt><i>cancelled</i> (function)</dt> +</dd> +<dt><i>cancelled</i> (function)</dt> <dd> reference to function checking for a cancellation -</dd><dt><i>maxProcesses</i> (int)</dt> +</dd> +<dt><i>maxProcesses</i> (int)</dt> <dd> number of processes to be used </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="initBatchService" ID="initBatchService"></a> <h2>initBatchService</h2> <b>initBatchService</b>(<i></i>) + <p> Initialize the batch service and return the entry point. -</p><dl> +</p> +<dl> <dt>Returns:</dt> <dd> the entry point for the background client (function) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="initService" ID="initService"></a> <h2>initService</h2> <b>initService</b>(<i></i>) + <p> Initialize the service and return the entry point. -</p><dl> +</p> +<dl> <dt>Returns:</dt> <dd> the entry point for the background client (function) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="rawCodeMetrics" ID="rawCodeMetrics"></a> <h2>rawCodeMetrics</h2> <b>rawCodeMetrics</b>(<i>file, text=""</i>) + <p> Private function to calculate the raw code metrics of one file. -</p><dl> +</p> +<dl> + <dt><i>file</i> (str)</dt> <dd> source filename -</dd><dt><i>text</i> (str)</dt> +</dd> +<dt><i>text</i> (str)</dt> <dd> source text </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> tuple containing the result dictionary </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> (tuple of dict) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="worker" ID="worker"></a> <h2>worker</h2> <b>worker</b>(<i>inputQueue, outputQueue</i>) + <p> Module function acting as the parallel worker for the raw code metrics calculation. -</p><dl> +</p> +<dl> + <dt><i>inputQueue</i> (multiprocessing.Queue)</dt> <dd> input queue -</dd><dt><i>outputQueue</i> (multiprocessing.Queue)</dt> +</dd> +<dt><i>outputQueue</i> (multiprocessing.Queue)</dt> <dd> output queue </dd>
--- a/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.CyclomaticComplexityCalculator.html Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.CyclomaticComplexityCalculator.html Tue Jun 23 19:05:15 2020 +0200 @@ -18,212 +18,270 @@ </style> </head> -<body><a NAME="top" ID="top"></a> +<body> +<a NAME="top" ID="top"></a> <h1>Plugin_Metrics_Radon.RadonMetrics.CyclomaticComplexityCalculator</h1> + <p> Module implementing the cyclomatic complexity service. </p> <h3>Global Attributes</h3> + <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> + <table> <tr><td>None</td></tr> </table> <h3>Functions</h3> + <table> + <tr> <td><a href="#__cc2Dict">__cc2Dict</a></td> <td>Private function to convert an object holding cyclomatic complexity results into a dictionary.</td> -</tr><tr> +</tr> +<tr> <td><a href="#__cyclomaticComplexity">__cyclomaticComplexity</a></td> <td>Private function to calculate the cyclomatic complexity for one Python file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#__getType">__getType</a></td> <td>Private function to get the type of an object as a string.</td> -</tr><tr> +</tr> +<tr> <td><a href="#batchCyclomaticComplexity">batchCyclomaticComplexity</a></td> <td>Module function to calculate the cyclomatic complexity for a batch of files.</td> -</tr><tr> +</tr> +<tr> <td><a href="#cyclomaticComplexity">cyclomaticComplexity</a></td> <td>Private function to calculate the cyclomatic complexity of one file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#initBatchService">initBatchService</a></td> <td>Initialize the batch service and return the entry point.</td> -</tr><tr> +</tr> +<tr> <td><a href="#initService">initService</a></td> <td>Initialize the service and return the entry point.</td> -</tr><tr> +</tr> +<tr> <td><a href="#worker">worker</a></td> <td>Module function acting as the parallel worker for the cyclomatic complexity calculation.</td> </tr> </table> -<hr /><hr /> +<hr /> +<hr /> <a NAME="__cc2Dict" ID="__cc2Dict"></a> <h2>__cc2Dict</h2> <b>__cc2Dict</b>(<i>obj</i>) + <p> Private function to convert an object holding cyclomatic complexity results into a dictionary. -</p><dl> +</p> +<dl> + <dt><i>obj</i> (radon.visitors.Function)</dt> <dd> object as returned from cc_visit() </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> conversion result </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> dict </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="__cyclomaticComplexity" ID="__cyclomaticComplexity"></a> <h2>__cyclomaticComplexity</h2> <b>__cyclomaticComplexity</b>(<i>file, text=""</i>) + <p> Private function to calculate the cyclomatic complexity for one Python file. -</p><dl> +</p> +<dl> + <dt><i>file</i> (str)</dt> <dd> source filename -</dd><dt><i>text</i> (str)</dt> +</dd> +<dt><i>text</i> (str)</dt> <dd> source text </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> tuple containing the result dictionary </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> (tuple of dict) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="__getType" ID="__getType"></a> <h2>__getType</h2> <b>__getType</b>(<i>obj</i>) + <p> Private function to get the type of an object as a string. -</p><dl> +</p> +<dl> + <dt><i>obj</i> (radon.visitors.Function or radon.visitors.Class)</dt> <dd> object to be analyzed </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> type string for the object </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> str, one of ["method", "function", "class"] </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="batchCyclomaticComplexity" ID="batchCyclomaticComplexity"></a> <h2>batchCyclomaticComplexity</h2> <b>batchCyclomaticComplexity</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>) + <p> Module function to calculate the cyclomatic complexity for a batch of files. -</p><dl> +</p> +<dl> + <dt><i>argumentsList</i> (list)</dt> <dd> list of arguments tuples as given for cyclomaticComplexity -</dd><dt><i>send</i> (function)</dt> +</dd> +<dt><i>send</i> (function)</dt> <dd> reference to send function -</dd><dt><i>fx</i> (str)</dt> +</dd> +<dt><i>fx</i> (str)</dt> <dd> registered service name -</dd><dt><i>cancelled</i> (function)</dt> +</dd> +<dt><i>cancelled</i> (function)</dt> <dd> reference to function checking for a cancellation -</dd><dt><i>maxProcesses</i> (int)</dt> +</dd> +<dt><i>maxProcesses</i> (int)</dt> <dd> number of processes to be used </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="cyclomaticComplexity" ID="cyclomaticComplexity"></a> <h2>cyclomaticComplexity</h2> <b>cyclomaticComplexity</b>(<i>file, text=""</i>) + <p> Private function to calculate the cyclomatic complexity of one file. -</p><dl> +</p> +<dl> + <dt><i>file</i> (str)</dt> <dd> source filename -</dd><dt><i>text</i> (str)</dt> +</dd> +<dt><i>text</i> (str)</dt> <dd> source text </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> tuple containing the result dictionary </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> (tuple of dict) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="initBatchService" ID="initBatchService"></a> <h2>initBatchService</h2> <b>initBatchService</b>(<i></i>) + <p> Initialize the batch service and return the entry point. -</p><dl> +</p> +<dl> <dt>Returns:</dt> <dd> the entry point for the background client (function) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="initService" ID="initService"></a> <h2>initService</h2> <b>initService</b>(<i></i>) + <p> Initialize the service and return the entry point. -</p><dl> +</p> +<dl> <dt>Returns:</dt> <dd> the entry point for the background client (function) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="worker" ID="worker"></a> <h2>worker</h2> <b>worker</b>(<i>inputQueue, outputQueue</i>) + <p> Module function acting as the parallel worker for the cyclomatic complexity calculation. -</p><dl> +</p> +<dl> + <dt><i>inputQueue</i> (multiprocessing.Queue)</dt> <dd> input queue -</dd><dt><i>outputQueue</i> (multiprocessing.Queue)</dt> +</dd> +<dt><i>outputQueue</i> (multiprocessing.Queue)</dt> <dd> output queue </dd>
--- a/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.CyclomaticComplexityDialog.html Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.CyclomaticComplexityDialog.html Tue Jun 23 19:05:15 2020 +0200 @@ -18,30 +18,38 @@ </style> </head> -<body><a NAME="top" ID="top"></a> +<body> +<a NAME="top" ID="top"></a> <h1>Plugin_Metrics_Radon.RadonMetrics.CyclomaticComplexityDialog</h1> + <p> Module implementing a dialog to show the cyclomatic complexity (McCabe complexity). </p> <h3>Global Attributes</h3> + <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> + <table> + <tr> <td><a href="#CyclomaticComplexityDialog">CyclomaticComplexityDialog</a></td> <td>Class implementing a dialog to show the cyclomatic complexity (McCabe complexity).</td> </tr> </table> <h3>Functions</h3> + <table> <tr><td>None</td></tr> </table> -<hr /><hr /> +<hr /> +<hr /> <a NAME="CyclomaticComplexityDialog" ID="CyclomaticComplexityDialog"></a> <h2>CyclomaticComplexityDialog</h2> + <p> Class implementing a dialog to show the cyclomatic complexity (McCabe complexity). @@ -49,303 +57,412 @@ <h3>Derived from</h3> QDialog, Ui_CyclomaticComplexityDialog <h3>Class Attributes</h3> + <table> <tr><td>FilePathRole</td></tr><tr><td>LineNumberRole</td></tr> </table> <h3>Class Methods</h3> + <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> + <table> + <tr> <td><a href="#CyclomaticComplexityDialog.__init__">CyclomaticComplexityDialog</a></td> <td>Constructor</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.__batchFinished">__batchFinished</a></td> <td>Private slot handling the completion of a batch job.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.__createErrorItem">__createErrorItem</a></td> <td>Private slot to create a new error item in the result list.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.__createFileItem">__createFileItem</a></td> <td>Private method to create a new file item in the result list.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.__createResultItem">__createResultItem</a></td> <td>Private slot to create a new item in the result list.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.__finish">__finish</a></td> <td>Private slot called when the action or the user pressed the button.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.__processError">__processError</a></td> <td>Private slot to process an error indication from the service.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.__processResult">__processResult</a></td> <td>Private slot called after perfoming a cyclomatic complexity calculation on one file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.__resizeResultColumns">__resizeResultColumns</a></td> <td>Private method to resize the list columns.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.__resultCollapse">__resultCollapse</a></td> <td>Private slot to collapse all entries of the resultlist.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.__resultExpand">__resultExpand</a></td> <td>Private slot to expand all entries of the resultlist.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.__showContextMenu">__showContextMenu</a></td> <td>Private slot to show the context menu of the resultlist.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.clear">clear</a></td> <td>Public method to clear all results.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.cyclomaticComplexity">cyclomaticComplexity</a></td> <td>Public method to start a cyclomatic complexity calculation for one Python file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.cyclomaticComplexityBatch">cyclomaticComplexityBatch</a></td> <td>Public method to start a cyclomatic complexity calculation batch job.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> <td>Private slot called by a button of the button box clicked.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.on_rankComboBox_activated">on_rankComboBox_activated</a></td> <td>Private slot to handle the selection of a minimum rank.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td> <td>Private slot to handle the activation of a result item.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.on_startButton_clicked">on_startButton_clicked</a></td> <td>Private slot to start a cyclomatic complexity run.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.prepare">prepare</a></td> <td>Public method to prepare the dialog with a list of filenames.</td> -</tr><tr> +</tr> +<tr> <td><a href="#CyclomaticComplexityDialog.start">start</a></td> <td>Public slot to start the cyclomatic complexity determination.</td> </tr> </table> <h3>Static Methods</h3> + <table> <tr><td>None</td></tr> </table> + <a NAME="CyclomaticComplexityDialog.__init__" ID="CyclomaticComplexityDialog.__init__"></a> <h4>CyclomaticComplexityDialog (Constructor)</h4> <b>CyclomaticComplexityDialog</b>(<i>radonService, isSingle=False, parent=None</i>) + <p> Constructor -</p><dl> +</p> +<dl> + <dt><i>radonService</i> (RadonMetricsPlugin)</dt> <dd> reference to the service -</dd><dt><i>isSingle</i> (bool)</dt> +</dd> +<dt><i>isSingle</i> (bool)</dt> <dd> flag indicating a single file dialog -</dd><dt><i>parent</i> (QWidget)</dt> +</dd> +<dt><i>parent</i> (QWidget)</dt> <dd> reference to the parent widget </dd> -</dl><a NAME="CyclomaticComplexityDialog.__batchFinished" ID="CyclomaticComplexityDialog.__batchFinished"></a> +</dl> +<a NAME="CyclomaticComplexityDialog.__batchFinished" ID="CyclomaticComplexityDialog.__batchFinished"></a> <h4>CyclomaticComplexityDialog.__batchFinished</h4> <b>__batchFinished</b>(<i>type_</i>) + <p> Private slot handling the completion of a batch job. -</p><dl> +</p> +<dl> + <dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt> <dd> type of the calculated metrics </dd> -</dl><a NAME="CyclomaticComplexityDialog.__createErrorItem" ID="CyclomaticComplexityDialog.__createErrorItem"></a> +</dl> +<a NAME="CyclomaticComplexityDialog.__createErrorItem" ID="CyclomaticComplexityDialog.__createErrorItem"></a> <h4>CyclomaticComplexityDialog.__createErrorItem</h4> <b>__createErrorItem</b>(<i>filename, message</i>) + <p> Private slot to create a new error item in the result list. -</p><dl> -<dt><i>filename</i> (str)</dt> -<dd> -name of the file -</dd><dt><i>message</i> (str)</dt> -<dd> -error message -</dd> -</dl><a NAME="CyclomaticComplexityDialog.__createFileItem" ID="CyclomaticComplexityDialog.__createFileItem"></a> -<h4>CyclomaticComplexityDialog.__createFileItem</h4> -<b>__createFileItem</b>(<i>filename</i>) -<p> - Private method to create a new file item in the result list. -</p><dl> +</p> +<dl> + <dt><i>filename</i> (str)</dt> <dd> name of the file </dd> -</dl><dl> +<dt><i>message</i> (str)</dt> +<dd> +error message +</dd> +</dl> +<a NAME="CyclomaticComplexityDialog.__createFileItem" ID="CyclomaticComplexityDialog.__createFileItem"></a> +<h4>CyclomaticComplexityDialog.__createFileItem</h4> +<b>__createFileItem</b>(<i>filename</i>) + +<p> + Private method to create a new file item in the result list. +</p> +<dl> + +<dt><i>filename</i> (str)</dt> +<dd> +name of the file +</dd> +</dl> +<dl> <dt>Returns:</dt> <dd> reference to the created item </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> QTreeWidgetItem </dd> -</dl><a NAME="CyclomaticComplexityDialog.__createResultItem" ID="CyclomaticComplexityDialog.__createResultItem"></a> +</dl> +<a NAME="CyclomaticComplexityDialog.__createResultItem" ID="CyclomaticComplexityDialog.__createResultItem"></a> <h4>CyclomaticComplexityDialog.__createResultItem</h4> <b>__createResultItem</b>(<i>parentItem, values</i>) + <p> Private slot to create a new item in the result list. -</p><dl> +</p> +<dl> + <dt><i>parentItem</i> (QTreeWidgetItem)</dt> <dd> reference to the parent item -</dd><dt><i>values</i> (dict)</dt> +</dd> +<dt><i>values</i> (dict)</dt> <dd> values to be displayed </dd> -</dl><a NAME="CyclomaticComplexityDialog.__finish" ID="CyclomaticComplexityDialog.__finish"></a> +</dl> +<a NAME="CyclomaticComplexityDialog.__finish" ID="CyclomaticComplexityDialog.__finish"></a> <h4>CyclomaticComplexityDialog.__finish</h4> <b>__finish</b>(<i></i>) + <p> Private slot called when the action or the user pressed the button. -</p><a NAME="CyclomaticComplexityDialog.__processError" ID="CyclomaticComplexityDialog.__processError"></a> +</p> +<a NAME="CyclomaticComplexityDialog.__processError" ID="CyclomaticComplexityDialog.__processError"></a> <h4>CyclomaticComplexityDialog.__processError</h4> <b>__processError</b>(<i>type_, fn, msg</i>) + <p> Private slot to process an error indication from the service. -</p><dl> +</p> +<dl> + <dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt> <dd> type of the calculated metrics -</dd><dt><i>fn</i> (str)</dt> +</dd> +<dt><i>fn</i> (str)</dt> <dd> filename of the file -</dd><dt><i>msg</i> (str)</dt> +</dd> +<dt><i>msg</i> (str)</dt> <dd> error message </dd> -</dl><a NAME="CyclomaticComplexityDialog.__processResult" ID="CyclomaticComplexityDialog.__processResult"></a> +</dl> +<a NAME="CyclomaticComplexityDialog.__processResult" ID="CyclomaticComplexityDialog.__processResult"></a> <h4>CyclomaticComplexityDialog.__processResult</h4> <b>__processResult</b>(<i>fn, result</i>) + <p> Private slot called after perfoming a cyclomatic complexity calculation on one file. -</p><dl> +</p> +<dl> + <dt><i>fn</i> (str)</dt> <dd> filename of the file -</dd><dt><i>result</i> (dict)</dt> +</dd> +<dt><i>result</i> (dict)</dt> <dd> result dict </dd> -</dl><a NAME="CyclomaticComplexityDialog.__resizeResultColumns" ID="CyclomaticComplexityDialog.__resizeResultColumns"></a> +</dl> +<a NAME="CyclomaticComplexityDialog.__resizeResultColumns" ID="CyclomaticComplexityDialog.__resizeResultColumns"></a> <h4>CyclomaticComplexityDialog.__resizeResultColumns</h4> <b>__resizeResultColumns</b>(<i></i>) + <p> Private method to resize the list columns. -</p><a NAME="CyclomaticComplexityDialog.__resultCollapse" ID="CyclomaticComplexityDialog.__resultCollapse"></a> +</p> +<a NAME="CyclomaticComplexityDialog.__resultCollapse" ID="CyclomaticComplexityDialog.__resultCollapse"></a> <h4>CyclomaticComplexityDialog.__resultCollapse</h4> <b>__resultCollapse</b>(<i></i>) + <p> Private slot to collapse all entries of the resultlist. -</p><a NAME="CyclomaticComplexityDialog.__resultExpand" ID="CyclomaticComplexityDialog.__resultExpand"></a> +</p> +<a NAME="CyclomaticComplexityDialog.__resultExpand" ID="CyclomaticComplexityDialog.__resultExpand"></a> <h4>CyclomaticComplexityDialog.__resultExpand</h4> <b>__resultExpand</b>(<i></i>) + <p> Private slot to expand all entries of the resultlist. -</p><a NAME="CyclomaticComplexityDialog.__showContextMenu" ID="CyclomaticComplexityDialog.__showContextMenu"></a> +</p> +<a NAME="CyclomaticComplexityDialog.__showContextMenu" ID="CyclomaticComplexityDialog.__showContextMenu"></a> <h4>CyclomaticComplexityDialog.__showContextMenu</h4> <b>__showContextMenu</b>(<i>coord</i>) + <p> Private slot to show the context menu of the resultlist. -</p><dl> +</p> +<dl> + <dt><i>coord</i></dt> <dd> the position of the mouse pointer (QPoint) </dd> -</dl><a NAME="CyclomaticComplexityDialog.clear" ID="CyclomaticComplexityDialog.clear"></a> +</dl> +<a NAME="CyclomaticComplexityDialog.clear" ID="CyclomaticComplexityDialog.clear"></a> <h4>CyclomaticComplexityDialog.clear</h4> <b>clear</b>(<i></i>) + <p> Public method to clear all results. -</p><a NAME="CyclomaticComplexityDialog.cyclomaticComplexity" ID="CyclomaticComplexityDialog.cyclomaticComplexity"></a> +</p> +<a NAME="CyclomaticComplexityDialog.cyclomaticComplexity" ID="CyclomaticComplexityDialog.cyclomaticComplexity"></a> <h4>CyclomaticComplexityDialog.cyclomaticComplexity</h4> <b>cyclomaticComplexity</b>(<i>codestring=''</i>) + <p> Public method to start a cyclomatic complexity calculation for one Python file. -</p><p> +</p> +<p> The results are reported to the __processResult slot. -</p><dl> +</p> +<dl> + <dt><i>codestring=</i> (str)</dt> <dd> optional sourcestring </dd> -</dl><a NAME="CyclomaticComplexityDialog.cyclomaticComplexityBatch" ID="CyclomaticComplexityDialog.cyclomaticComplexityBatch"></a> +</dl> +<a NAME="CyclomaticComplexityDialog.cyclomaticComplexityBatch" ID="CyclomaticComplexityDialog.cyclomaticComplexityBatch"></a> <h4>CyclomaticComplexityDialog.cyclomaticComplexityBatch</h4> <b>cyclomaticComplexityBatch</b>(<i></i>) + <p> Public method to start a cyclomatic complexity calculation batch job. -</p><p> +</p> +<p> The results are reported to the __processResult slot. -</p><a NAME="CyclomaticComplexityDialog.on_buttonBox_clicked" ID="CyclomaticComplexityDialog.on_buttonBox_clicked"></a> +</p> +<a NAME="CyclomaticComplexityDialog.on_buttonBox_clicked" ID="CyclomaticComplexityDialog.on_buttonBox_clicked"></a> <h4>CyclomaticComplexityDialog.on_buttonBox_clicked</h4> <b>on_buttonBox_clicked</b>(<i>button</i>) + <p> Private slot called by a button of the button box clicked. -</p><dl> +</p> +<dl> + <dt><i>button</i> (QAbstractButton)</dt> <dd> button that was clicked </dd> -</dl><a NAME="CyclomaticComplexityDialog.on_rankComboBox_activated" ID="CyclomaticComplexityDialog.on_rankComboBox_activated"></a> +</dl> +<a NAME="CyclomaticComplexityDialog.on_rankComboBox_activated" ID="CyclomaticComplexityDialog.on_rankComboBox_activated"></a> <h4>CyclomaticComplexityDialog.on_rankComboBox_activated</h4> <b>on_rankComboBox_activated</b>(<i>rank</i>) + <p> Private slot to handle the selection of a minimum rank. -</p><dl> +</p> +<dl> + <dt><i>rank</i> (str)</dt> <dd> selected minimum rank </dd> -</dl><a NAME="CyclomaticComplexityDialog.on_resultList_itemActivated" ID="CyclomaticComplexityDialog.on_resultList_itemActivated"></a> +</dl> +<a NAME="CyclomaticComplexityDialog.on_resultList_itemActivated" ID="CyclomaticComplexityDialog.on_resultList_itemActivated"></a> <h4>CyclomaticComplexityDialog.on_resultList_itemActivated</h4> <b>on_resultList_itemActivated</b>(<i>item, column</i>) + <p> Private slot to handle the activation of a result item. -</p><dl> +</p> +<dl> + <dt><i>item</i> (QTreeWidgetItem)</dt> <dd> reference to the activated item -</dd><dt><i>column</i> (int)</dt> +</dd> +<dt><i>column</i> (int)</dt> <dd> activated column </dd> -</dl><a NAME="CyclomaticComplexityDialog.on_startButton_clicked" ID="CyclomaticComplexityDialog.on_startButton_clicked"></a> +</dl> +<a NAME="CyclomaticComplexityDialog.on_startButton_clicked" ID="CyclomaticComplexityDialog.on_startButton_clicked"></a> <h4>CyclomaticComplexityDialog.on_startButton_clicked</h4> <b>on_startButton_clicked</b>(<i></i>) + <p> Private slot to start a cyclomatic complexity run. -</p><a NAME="CyclomaticComplexityDialog.prepare" ID="CyclomaticComplexityDialog.prepare"></a> +</p> +<a NAME="CyclomaticComplexityDialog.prepare" ID="CyclomaticComplexityDialog.prepare"></a> <h4>CyclomaticComplexityDialog.prepare</h4> <b>prepare</b>(<i>fileList, project</i>) + <p> Public method to prepare the dialog with a list of filenames. -</p><dl> +</p> +<dl> + <dt><i>fileList</i> (list of str)</dt> <dd> list of filenames -</dd><dt><i>project</i> (Project)</dt> +</dd> +<dt><i>project</i> (Project)</dt> <dd> reference to the project object </dd> -</dl><a NAME="CyclomaticComplexityDialog.start" ID="CyclomaticComplexityDialog.start"></a> +</dl> +<a NAME="CyclomaticComplexityDialog.start" ID="CyclomaticComplexityDialog.start"></a> <h4>CyclomaticComplexityDialog.start</h4> <b>start</b>(<i>fn, minRank="D"</i>) + <p> Public slot to start the cyclomatic complexity determination. -</p><dl> +</p> +<dl> + <dt><i>fn</i> (str or list of str)</dt> <dd> file or list of files or directory to show the cyclomatic complexity for -</dd><dt><i>minRank</i> (str (one character out of A - F))</dt> +</dd> +<dt><i>minRank</i> (str (one character out of A - F))</dt> <dd> minimum rank of entries to be shown </dd>
--- a/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.MaintainabilityIndexCalculator.html Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.MaintainabilityIndexCalculator.html Tue Jun 23 19:05:15 2020 +0200 @@ -18,159 +18,203 @@ </style> </head> -<body><a NAME="top" ID="top"></a> +<body> +<a NAME="top" ID="top"></a> <h1>Plugin_Metrics_Radon.RadonMetrics.MaintainabilityIndexCalculator</h1> + <p> Module implementing the maintainability index service. </p> <h3>Global Attributes</h3> + <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> + <table> <tr><td>None</td></tr> </table> <h3>Functions</h3> + <table> + <tr> <td><a href="#__maintainabilityIndex">__maintainabilityIndex</a></td> <td>Private function to calculate the maintainability index for one Python file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#batchMaintainabilityIndex">batchMaintainabilityIndex</a></td> <td>Module function to calculate the maintainability index for a batch of files.</td> -</tr><tr> +</tr> +<tr> <td><a href="#initBatchService">initBatchService</a></td> <td>Initialize the batch service and return the entry point.</td> -</tr><tr> +</tr> +<tr> <td><a href="#initService">initService</a></td> <td>Initialize the service and return the entry point.</td> -</tr><tr> +</tr> +<tr> <td><a href="#maintainabilityIndex">maintainabilityIndex</a></td> <td>Private function to calculate the maintainability index of one file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#worker">worker</a></td> <td>Module function acting as the parallel worker for the maintainability index calculation.</td> </tr> </table> -<hr /><hr /> +<hr /> +<hr /> <a NAME="__maintainabilityIndex" ID="__maintainabilityIndex"></a> <h2>__maintainabilityIndex</h2> <b>__maintainabilityIndex</b>(<i>file, text=""</i>) + <p> Private function to calculate the maintainability index for one Python file. -</p><dl> +</p> +<dl> + <dt><i>file</i> (str)</dt> <dd> source filename -</dd><dt><i>text</i> (str)</dt> +</dd> +<dt><i>text</i> (str)</dt> <dd> source text </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> tuple containing the result dictionary </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> (tuple of dict) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="batchMaintainabilityIndex" ID="batchMaintainabilityIndex"></a> <h2>batchMaintainabilityIndex</h2> <b>batchMaintainabilityIndex</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>) + <p> Module function to calculate the maintainability index for a batch of files. -</p><dl> +</p> +<dl> + <dt><i>argumentsList</i> (list)</dt> <dd> list of arguments tuples as given for maintainabilityIndex -</dd><dt><i>send</i> (function)</dt> +</dd> +<dt><i>send</i> (function)</dt> <dd> reference to send function -</dd><dt><i>fx</i> (str)</dt> +</dd> +<dt><i>fx</i> (str)</dt> <dd> registered service name -</dd><dt><i>cancelled</i> (function)</dt> +</dd> +<dt><i>cancelled</i> (function)</dt> <dd> reference to function checking for a cancellation -</dd><dt><i>maxProcesses</i> (int)</dt> +</dd> +<dt><i>maxProcesses</i> (int)</dt> <dd> number of processes to be used </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="initBatchService" ID="initBatchService"></a> <h2>initBatchService</h2> <b>initBatchService</b>(<i></i>) + <p> Initialize the batch service and return the entry point. -</p><dl> +</p> +<dl> <dt>Returns:</dt> <dd> the entry point for the background client (function) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="initService" ID="initService"></a> <h2>initService</h2> <b>initService</b>(<i></i>) + <p> Initialize the service and return the entry point. -</p><dl> +</p> +<dl> <dt>Returns:</dt> <dd> the entry point for the background client (function) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="maintainabilityIndex" ID="maintainabilityIndex"></a> <h2>maintainabilityIndex</h2> <b>maintainabilityIndex</b>(<i>file, text=""</i>) + <p> Private function to calculate the maintainability index of one file. -</p><dl> +</p> +<dl> + <dt><i>file</i> (str)</dt> <dd> source filename -</dd><dt><i>text</i> (str)</dt> +</dd> +<dt><i>text</i> (str)</dt> <dd> source text </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> tuple containing the result dictionary </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> (tuple of dict) </dd> </dl> <div align="right"><a href="#top">Up</a></div> -<hr /><hr /> +<hr /> +<hr /> <a NAME="worker" ID="worker"></a> <h2>worker</h2> <b>worker</b>(<i>inputQueue, outputQueue</i>) + <p> Module function acting as the parallel worker for the maintainability index calculation. -</p><dl> +</p> +<dl> + <dt><i>inputQueue</i> (multiprocessing.Queue)</dt> <dd> input queue -</dd><dt><i>outputQueue</i> (multiprocessing.Queue)</dt> +</dd> +<dt><i>outputQueue</i> (multiprocessing.Queue)</dt> <dd> output queue </dd>
--- a/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.MaintainabilityIndexDialog.html Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.MaintainabilityIndexDialog.html Tue Jun 23 19:05:15 2020 +0200 @@ -18,259 +18,351 @@ </style> </head> -<body><a NAME="top" ID="top"></a> +<body> +<a NAME="top" ID="top"></a> <h1>Plugin_Metrics_Radon.RadonMetrics.MaintainabilityIndexDialog</h1> + <p> Module implementing a dialog to show maintainability indexes. </p> <h3>Global Attributes</h3> + <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> + <table> + <tr> <td><a href="#MaintainabilityIndexDialog">MaintainabilityIndexDialog</a></td> <td>Class implementing a dialog to show maintainability indexes.</td> </tr> </table> <h3>Functions</h3> + <table> <tr><td>None</td></tr> </table> -<hr /><hr /> +<hr /> +<hr /> <a NAME="MaintainabilityIndexDialog" ID="MaintainabilityIndexDialog"></a> <h2>MaintainabilityIndexDialog</h2> + <p> Class implementing a dialog to show maintainability indexes. </p> <h3>Derived from</h3> QDialog, Ui_MaintainabilityIndexDialog <h3>Class Attributes</h3> + <table> <tr><td>FilePathRole</td></tr> </table> <h3>Class Methods</h3> + <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> + <table> + <tr> <td><a href="#MaintainabilityIndexDialog.__init__">MaintainabilityIndexDialog</a></td> <td>Constructor</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.__batchFinished">__batchFinished</a></td> <td>Private slot handling the completion of a batch job.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.__createErrorItem">__createErrorItem</a></td> <td>Private slot to create a new error item in the result list.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.__createResultItem">__createResultItem</a></td> <td>Private slot to create a new item in the result list.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.__finish">__finish</a></td> <td>Private slot called when the action or the user pressed the button.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.__processError">__processError</a></td> <td>Private slot to process an error indication from the service.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.__processResult">__processResult</a></td> <td>Private slot called after perfoming a maintainability index calculation on one file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.__resizeResultColumns">__resizeResultColumns</a></td> <td>Private method to resize the list columns.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.clear">clear</a></td> <td>Public method to clear all results.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.maintainabilityIndex">maintainabilityIndex</a></td> <td>Public method to start a maintainability index calculation for one Python file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.maintainabilityIndexBatch">maintainabilityIndexBatch</a></td> <td>Public method to start a maintainability index calculation batch job.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> <td>Private slot called by a button of the button box clicked.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td> <td>Private slot to handle the activation of a result item.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.on_startButton_clicked">on_startButton_clicked</a></td> <td>Private slot to start a maintainability index run.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.prepare">prepare</a></td> <td>Public method to prepare the dialog with a list of filenames.</td> -</tr><tr> +</tr> +<tr> <td><a href="#MaintainabilityIndexDialog.start">start</a></td> <td>Public slot to start the maintainability index determination.</td> </tr> </table> <h3>Static Methods</h3> + <table> <tr><td>None</td></tr> </table> + <a NAME="MaintainabilityIndexDialog.__init__" ID="MaintainabilityIndexDialog.__init__"></a> <h4>MaintainabilityIndexDialog (Constructor)</h4> <b>MaintainabilityIndexDialog</b>(<i>radonService, parent=None</i>) + <p> Constructor -</p><dl> +</p> +<dl> + <dt><i>radonService</i> (RadonMetricsPlugin)</dt> <dd> reference to the service -</dd><dt><i>parent</i> (QWidget)</dt> +</dd> +<dt><i>parent</i> (QWidget)</dt> <dd> reference to the parent widget </dd> -</dl><a NAME="MaintainabilityIndexDialog.__batchFinished" ID="MaintainabilityIndexDialog.__batchFinished"></a> +</dl> +<a NAME="MaintainabilityIndexDialog.__batchFinished" ID="MaintainabilityIndexDialog.__batchFinished"></a> <h4>MaintainabilityIndexDialog.__batchFinished</h4> <b>__batchFinished</b>(<i>type_</i>) + <p> Private slot handling the completion of a batch job. -</p><dl> +</p> +<dl> + +<dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt> +<dd> +type of the calculated metrics +</dd> +</dl> +<a NAME="MaintainabilityIndexDialog.__createErrorItem" ID="MaintainabilityIndexDialog.__createErrorItem"></a> +<h4>MaintainabilityIndexDialog.__createErrorItem</h4> +<b>__createErrorItem</b>(<i>filename, message</i>) + +<p> + Private slot to create a new error item in the result list. +</p> +<dl> + +<dt><i>filename</i> (str)</dt> +<dd> +name of the file +</dd> +<dt><i>message</i> (str)</dt> +<dd> +error message +</dd> +</dl> +<a NAME="MaintainabilityIndexDialog.__createResultItem" ID="MaintainabilityIndexDialog.__createResultItem"></a> +<h4>MaintainabilityIndexDialog.__createResultItem</h4> +<b>__createResultItem</b>(<i>filename, values</i>) + +<p> + Private slot to create a new item in the result list. +</p> +<dl> + +<dt><i>filename</i> (str)</dt> +<dd> +name of the file +</dd> +<dt><i>values</i> (dict)</dt> +<dd> +values to be displayed +</dd> +</dl> +<a NAME="MaintainabilityIndexDialog.__finish" ID="MaintainabilityIndexDialog.__finish"></a> +<h4>MaintainabilityIndexDialog.__finish</h4> +<b>__finish</b>(<i></i>) + +<p> + Private slot called when the action or the user pressed the button. +</p> +<a NAME="MaintainabilityIndexDialog.__processError" ID="MaintainabilityIndexDialog.__processError"></a> +<h4>MaintainabilityIndexDialog.__processError</h4> +<b>__processError</b>(<i>type_, fn, msg</i>) + +<p> + Private slot to process an error indication from the service. +</p> +<dl> + <dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt> <dd> type of the calculated metrics </dd> -</dl><a NAME="MaintainabilityIndexDialog.__createErrorItem" ID="MaintainabilityIndexDialog.__createErrorItem"></a> -<h4>MaintainabilityIndexDialog.__createErrorItem</h4> -<b>__createErrorItem</b>(<i>filename, message</i>) -<p> - Private slot to create a new error item in the result list. -</p><dl> -<dt><i>filename</i> (str)</dt> +<dt><i>fn</i> (str)</dt> <dd> -name of the file -</dd><dt><i>message</i> (str)</dt> +filename of the file +</dd> +<dt><i>msg</i> (str)</dt> <dd> error message </dd> -</dl><a NAME="MaintainabilityIndexDialog.__createResultItem" ID="MaintainabilityIndexDialog.__createResultItem"></a> -<h4>MaintainabilityIndexDialog.__createResultItem</h4> -<b>__createResultItem</b>(<i>filename, values</i>) -<p> - Private slot to create a new item in the result list. -</p><dl> -<dt><i>filename</i> (str)</dt> -<dd> -name of the file -</dd><dt><i>values</i> (dict)</dt> -<dd> -values to be displayed -</dd> -</dl><a NAME="MaintainabilityIndexDialog.__finish" ID="MaintainabilityIndexDialog.__finish"></a> -<h4>MaintainabilityIndexDialog.__finish</h4> -<b>__finish</b>(<i></i>) -<p> - Private slot called when the action or the user pressed the button. -</p><a NAME="MaintainabilityIndexDialog.__processError" ID="MaintainabilityIndexDialog.__processError"></a> -<h4>MaintainabilityIndexDialog.__processError</h4> -<b>__processError</b>(<i>type_, fn, msg</i>) -<p> - Private slot to process an error indication from the service. -</p><dl> -<dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt> -<dd> -type of the calculated metrics -</dd><dt><i>fn</i> (str)</dt> -<dd> -filename of the file -</dd><dt><i>msg</i> (str)</dt> -<dd> -error message -</dd> -</dl><a NAME="MaintainabilityIndexDialog.__processResult" ID="MaintainabilityIndexDialog.__processResult"></a> +</dl> +<a NAME="MaintainabilityIndexDialog.__processResult" ID="MaintainabilityIndexDialog.__processResult"></a> <h4>MaintainabilityIndexDialog.__processResult</h4> <b>__processResult</b>(<i>fn, result</i>) + <p> Private slot called after perfoming a maintainability index calculation on one file. -</p><dl> +</p> +<dl> + <dt><i>fn</i> (str)</dt> <dd> filename of the file -</dd><dt><i>result</i> (dict)</dt> +</dd> +<dt><i>result</i> (dict)</dt> <dd> result dict </dd> -</dl><a NAME="MaintainabilityIndexDialog.__resizeResultColumns" ID="MaintainabilityIndexDialog.__resizeResultColumns"></a> +</dl> +<a NAME="MaintainabilityIndexDialog.__resizeResultColumns" ID="MaintainabilityIndexDialog.__resizeResultColumns"></a> <h4>MaintainabilityIndexDialog.__resizeResultColumns</h4> <b>__resizeResultColumns</b>(<i></i>) + <p> Private method to resize the list columns. -</p><a NAME="MaintainabilityIndexDialog.clear" ID="MaintainabilityIndexDialog.clear"></a> +</p> +<a NAME="MaintainabilityIndexDialog.clear" ID="MaintainabilityIndexDialog.clear"></a> <h4>MaintainabilityIndexDialog.clear</h4> <b>clear</b>(<i></i>) + <p> Public method to clear all results. -</p><a NAME="MaintainabilityIndexDialog.maintainabilityIndex" ID="MaintainabilityIndexDialog.maintainabilityIndex"></a> +</p> +<a NAME="MaintainabilityIndexDialog.maintainabilityIndex" ID="MaintainabilityIndexDialog.maintainabilityIndex"></a> <h4>MaintainabilityIndexDialog.maintainabilityIndex</h4> <b>maintainabilityIndex</b>(<i>codestring=''</i>) + <p> Public method to start a maintainability index calculation for one Python file. -</p><p> +</p> +<p> The results are reported to the __processResult slot. -</p><dl> +</p> +<dl> + <dt><i>codestring=</i> (str)</dt> <dd> optional sourcestring </dd> -</dl><a NAME="MaintainabilityIndexDialog.maintainabilityIndexBatch" ID="MaintainabilityIndexDialog.maintainabilityIndexBatch"></a> +</dl> +<a NAME="MaintainabilityIndexDialog.maintainabilityIndexBatch" ID="MaintainabilityIndexDialog.maintainabilityIndexBatch"></a> <h4>MaintainabilityIndexDialog.maintainabilityIndexBatch</h4> <b>maintainabilityIndexBatch</b>(<i></i>) + <p> Public method to start a maintainability index calculation batch job. -</p><p> +</p> +<p> The results are reported to the __processResult slot. -</p><a NAME="MaintainabilityIndexDialog.on_buttonBox_clicked" ID="MaintainabilityIndexDialog.on_buttonBox_clicked"></a> +</p> +<a NAME="MaintainabilityIndexDialog.on_buttonBox_clicked" ID="MaintainabilityIndexDialog.on_buttonBox_clicked"></a> <h4>MaintainabilityIndexDialog.on_buttonBox_clicked</h4> <b>on_buttonBox_clicked</b>(<i>button</i>) + <p> Private slot called by a button of the button box clicked. -</p><dl> +</p> +<dl> + <dt><i>button</i> (QAbstractButton)</dt> <dd> button that was clicked </dd> -</dl><a NAME="MaintainabilityIndexDialog.on_resultList_itemActivated" ID="MaintainabilityIndexDialog.on_resultList_itemActivated"></a> +</dl> +<a NAME="MaintainabilityIndexDialog.on_resultList_itemActivated" ID="MaintainabilityIndexDialog.on_resultList_itemActivated"></a> <h4>MaintainabilityIndexDialog.on_resultList_itemActivated</h4> <b>on_resultList_itemActivated</b>(<i>item, column</i>) + <p> Private slot to handle the activation of a result item. -</p><dl> +</p> +<dl> + <dt><i>item</i> (QTreeWidgetItem)</dt> <dd> reference to the activated item -</dd><dt><i>column</i> (int)</dt> +</dd> +<dt><i>column</i> (int)</dt> <dd> activated column </dd> -</dl><a NAME="MaintainabilityIndexDialog.on_startButton_clicked" ID="MaintainabilityIndexDialog.on_startButton_clicked"></a> +</dl> +<a NAME="MaintainabilityIndexDialog.on_startButton_clicked" ID="MaintainabilityIndexDialog.on_startButton_clicked"></a> <h4>MaintainabilityIndexDialog.on_startButton_clicked</h4> <b>on_startButton_clicked</b>(<i></i>) + <p> Private slot to start a maintainability index run. -</p><a NAME="MaintainabilityIndexDialog.prepare" ID="MaintainabilityIndexDialog.prepare"></a> +</p> +<a NAME="MaintainabilityIndexDialog.prepare" ID="MaintainabilityIndexDialog.prepare"></a> <h4>MaintainabilityIndexDialog.prepare</h4> <b>prepare</b>(<i>fileList, project</i>) + <p> Public method to prepare the dialog with a list of filenames. -</p><dl> +</p> +<dl> + <dt><i>fileList</i> (list of str)</dt> <dd> list of filenames -</dd><dt><i>project</i> (Project)</dt> +</dd> +<dt><i>project</i> (Project)</dt> <dd> reference to the project object </dd> -</dl><a NAME="MaintainabilityIndexDialog.start" ID="MaintainabilityIndexDialog.start"></a> +</dl> +<a NAME="MaintainabilityIndexDialog.start" ID="MaintainabilityIndexDialog.start"></a> <h4>MaintainabilityIndexDialog.start</h4> <b>start</b>(<i>fn</i>) + <p> Public slot to start the maintainability index determination. -</p><dl> +</p> +<dl> + <dt><i>fn</i> (str or list of str)</dt> <dd> file or list of files or directory to show
--- a/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.RawMetricsDialog.html Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.RawMetricsDialog.html Tue Jun 23 19:05:15 2020 +0200 @@ -18,305 +18,413 @@ </style> </head> -<body><a NAME="top" ID="top"></a> +<body> +<a NAME="top" ID="top"></a> <h1>Plugin_Metrics_Radon.RadonMetrics.RawMetricsDialog</h1> + <p> Module implementing a dialog to show raw code metrics. </p> <h3>Global Attributes</h3> + <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> + <table> + <tr> <td><a href="#RawMetricsDialog">RawMetricsDialog</a></td> <td>Class implementing a dialog to show raw code metrics.</td> </tr> </table> <h3>Functions</h3> + <table> <tr><td>None</td></tr> </table> -<hr /><hr /> +<hr /> +<hr /> <a NAME="RawMetricsDialog" ID="RawMetricsDialog"></a> <h2>RawMetricsDialog</h2> + <p> Class implementing a dialog to show raw code metrics. </p> <h3>Derived from</h3> QDialog, Ui_RawMetricsDialog <h3>Class Attributes</h3> + <table> <tr><td>FilePathRole</td></tr> </table> <h3>Class Methods</h3> + <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> + <table> + <tr> <td><a href="#RawMetricsDialog.__init__">RawMetricsDialog</a></td> <td>Constructor</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.__batchFinished">__batchFinished</a></td> <td>Private slot handling the completion of a batch job.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.__createErrorItem">__createErrorItem</a></td> <td>Private slot to create a new error item in the result list.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.__createResultItem">__createResultItem</a></td> <td>Private slot to create a new item in the result list.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.__createSummary">__createSummary</a></td> <td>Private method to create the code metrics summary.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.__createSummaryItem">__createSummaryItem</a></td> <td>Private slot to create a new item in the summary list.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.__finish">__finish</a></td> <td>Private slot called when the action or the user pressed the button.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.__getValues">__getValues</a></td> <td>Private method to extract the code metric values.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.__processError">__processError</a></td> <td>Private slot to process an error indication from the service.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.__processResult">__processResult</a></td> <td>Private slot called after perfoming a code metrics calculation on one file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.__resizeResultColumns">__resizeResultColumns</a></td> <td>Private method to resize the list columns.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.clear">clear</a></td> <td>Public method to clear all results.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> <td>Private slot called by a button of the button box clicked.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td> <td>Private slot to handle the activation of a result item.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.on_startButton_clicked">on_startButton_clicked</a></td> <td>Private slot to start a code metrics run.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.prepare">prepare</a></td> <td>Public method to prepare the dialog with a list of filenames.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.rawMetrics">rawMetrics</a></td> <td>Public method to start a code metrics calculation for one Python file.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.rawMetricsBatch">rawMetricsBatch</a></td> <td>Public method to start a code metrics calculation batch job.</td> -</tr><tr> +</tr> +<tr> <td><a href="#RawMetricsDialog.start">start</a></td> <td>Public slot to start the code metrics determination.</td> </tr> </table> <h3>Static Methods</h3> + <table> <tr><td>None</td></tr> </table> + <a NAME="RawMetricsDialog.__init__" ID="RawMetricsDialog.__init__"></a> <h4>RawMetricsDialog (Constructor)</h4> <b>RawMetricsDialog</b>(<i>radonService, parent=None</i>) + <p> Constructor -</p><dl> +</p> +<dl> + <dt><i>radonService</i> (RadonMetricsPlugin)</dt> <dd> reference to the service -</dd><dt><i>parent</i> (QWidget)</dt> +</dd> +<dt><i>parent</i> (QWidget)</dt> <dd> reference to the parent widget </dd> -</dl><a NAME="RawMetricsDialog.__batchFinished" ID="RawMetricsDialog.__batchFinished"></a> +</dl> +<a NAME="RawMetricsDialog.__batchFinished" ID="RawMetricsDialog.__batchFinished"></a> <h4>RawMetricsDialog.__batchFinished</h4> <b>__batchFinished</b>(<i>type_</i>) + <p> Private slot handling the completion of a batch job. -</p><dl> +</p> +<dl> + <dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt> <dd> type of the calculated metrics </dd> -</dl><a NAME="RawMetricsDialog.__createErrorItem" ID="RawMetricsDialog.__createErrorItem"></a> +</dl> +<a NAME="RawMetricsDialog.__createErrorItem" ID="RawMetricsDialog.__createErrorItem"></a> <h4>RawMetricsDialog.__createErrorItem</h4> <b>__createErrorItem</b>(<i>filename, message</i>) + <p> Private slot to create a new error item in the result list. -</p><dl> +</p> +<dl> + <dt><i>filename</i> (str)</dt> <dd> name of the file -</dd><dt><i>message</i> (str)</dt> +</dd> +<dt><i>message</i> (str)</dt> <dd> error message </dd> -</dl><a NAME="RawMetricsDialog.__createResultItem" ID="RawMetricsDialog.__createResultItem"></a> +</dl> +<a NAME="RawMetricsDialog.__createResultItem" ID="RawMetricsDialog.__createResultItem"></a> <h4>RawMetricsDialog.__createResultItem</h4> <b>__createResultItem</b>(<i>filename, values</i>) + <p> Private slot to create a new item in the result list. -</p><dl> +</p> +<dl> + <dt><i>filename</i> (str)</dt> <dd> name of the file -</dd><dt><i>values</i> (dict)</dt> +</dd> +<dt><i>values</i> (dict)</dt> <dd> values to be displayed </dd> -</dl><a NAME="RawMetricsDialog.__createSummary" ID="RawMetricsDialog.__createSummary"></a> +</dl> +<a NAME="RawMetricsDialog.__createSummary" ID="RawMetricsDialog.__createSummary"></a> <h4>RawMetricsDialog.__createSummary</h4> <b>__createSummary</b>(<i></i>) + <p> Private method to create the code metrics summary. -</p><a NAME="RawMetricsDialog.__createSummaryItem" ID="RawMetricsDialog.__createSummaryItem"></a> +</p> +<a NAME="RawMetricsDialog.__createSummaryItem" ID="RawMetricsDialog.__createSummaryItem"></a> <h4>RawMetricsDialog.__createSummaryItem</h4> <b>__createSummaryItem</b>(<i>col0, col1</i>) + <p> Private slot to create a new item in the summary list. -</p><dl> +</p> +<dl> + <dt><i>col0</i></dt> <dd> string for column 0 (string) -</dd><dt><i>col1</i></dt> +</dd> +<dt><i>col1</i></dt> <dd> string for column 1 (string) </dd> -</dl><a NAME="RawMetricsDialog.__finish" ID="RawMetricsDialog.__finish"></a> +</dl> +<a NAME="RawMetricsDialog.__finish" ID="RawMetricsDialog.__finish"></a> <h4>RawMetricsDialog.__finish</h4> <b>__finish</b>(<i></i>) + <p> Private slot called when the action or the user pressed the button. -</p><a NAME="RawMetricsDialog.__getValues" ID="RawMetricsDialog.__getValues"></a> +</p> +<a NAME="RawMetricsDialog.__getValues" ID="RawMetricsDialog.__getValues"></a> <h4>RawMetricsDialog.__getValues</h4> <b>__getValues</b>(<i>result</i>) + <p> Private method to extract the code metric values. -</p><dl> +</p> +<dl> + <dt><i>result</i> (dict)</dt> <dd> result dict </dd> -</dl><dl> +</dl> +<dl> <dt>Returns:</dt> <dd> list of values suitable for display </dd> -</dl><dl> +</dl> +<dl> <dt>Return Type:</dt> <dd> list of str </dd> -</dl><a NAME="RawMetricsDialog.__processError" ID="RawMetricsDialog.__processError"></a> +</dl> +<a NAME="RawMetricsDialog.__processError" ID="RawMetricsDialog.__processError"></a> <h4>RawMetricsDialog.__processError</h4> <b>__processError</b>(<i>type_, fn, msg</i>) + <p> Private slot to process an error indication from the service. -</p><dl> +</p> +<dl> + <dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt> <dd> type of the calculated metrics -</dd><dt><i>fn</i> (str)</dt> +</dd> +<dt><i>fn</i> (str)</dt> <dd> filename of the file -</dd><dt><i>msg</i> (str)</dt> +</dd> +<dt><i>msg</i> (str)</dt> <dd> error message </dd> -</dl><a NAME="RawMetricsDialog.__processResult" ID="RawMetricsDialog.__processResult"></a> +</dl> +<a NAME="RawMetricsDialog.__processResult" ID="RawMetricsDialog.__processResult"></a> <h4>RawMetricsDialog.__processResult</h4> <b>__processResult</b>(<i>fn, result</i>) + <p> Private slot called after perfoming a code metrics calculation on one file. -</p><dl> +</p> +<dl> + <dt><i>fn</i> (str)</dt> <dd> filename of the file -</dd><dt><i>result</i> (dict)</dt> +</dd> +<dt><i>result</i> (dict)</dt> <dd> result dict </dd> -</dl><a NAME="RawMetricsDialog.__resizeResultColumns" ID="RawMetricsDialog.__resizeResultColumns"></a> +</dl> +<a NAME="RawMetricsDialog.__resizeResultColumns" ID="RawMetricsDialog.__resizeResultColumns"></a> <h4>RawMetricsDialog.__resizeResultColumns</h4> <b>__resizeResultColumns</b>(<i></i>) + <p> Private method to resize the list columns. -</p><a NAME="RawMetricsDialog.clear" ID="RawMetricsDialog.clear"></a> +</p> +<a NAME="RawMetricsDialog.clear" ID="RawMetricsDialog.clear"></a> <h4>RawMetricsDialog.clear</h4> <b>clear</b>(<i></i>) + <p> Public method to clear all results. -</p><a NAME="RawMetricsDialog.on_buttonBox_clicked" ID="RawMetricsDialog.on_buttonBox_clicked"></a> +</p> +<a NAME="RawMetricsDialog.on_buttonBox_clicked" ID="RawMetricsDialog.on_buttonBox_clicked"></a> <h4>RawMetricsDialog.on_buttonBox_clicked</h4> <b>on_buttonBox_clicked</b>(<i>button</i>) + <p> Private slot called by a button of the button box clicked. -</p><dl> +</p> +<dl> + <dt><i>button</i> (QAbstractButton)</dt> <dd> button that was clicked </dd> -</dl><a NAME="RawMetricsDialog.on_resultList_itemActivated" ID="RawMetricsDialog.on_resultList_itemActivated"></a> +</dl> +<a NAME="RawMetricsDialog.on_resultList_itemActivated" ID="RawMetricsDialog.on_resultList_itemActivated"></a> <h4>RawMetricsDialog.on_resultList_itemActivated</h4> <b>on_resultList_itemActivated</b>(<i>item, column</i>) + <p> Private slot to handle the activation of a result item. -</p><dl> +</p> +<dl> + <dt><i>item</i> (QTreeWidgetItem)</dt> <dd> reference to the activated item -</dd><dt><i>column</i> (int)</dt> +</dd> +<dt><i>column</i> (int)</dt> <dd> activated column </dd> -</dl><a NAME="RawMetricsDialog.on_startButton_clicked" ID="RawMetricsDialog.on_startButton_clicked"></a> +</dl> +<a NAME="RawMetricsDialog.on_startButton_clicked" ID="RawMetricsDialog.on_startButton_clicked"></a> <h4>RawMetricsDialog.on_startButton_clicked</h4> <b>on_startButton_clicked</b>(<i></i>) + <p> Private slot to start a code metrics run. -</p><a NAME="RawMetricsDialog.prepare" ID="RawMetricsDialog.prepare"></a> +</p> +<a NAME="RawMetricsDialog.prepare" ID="RawMetricsDialog.prepare"></a> <h4>RawMetricsDialog.prepare</h4> <b>prepare</b>(<i>fileList, project</i>) + <p> Public method to prepare the dialog with a list of filenames. -</p><dl> +</p> +<dl> + <dt><i>fileList</i> (list of str)</dt> <dd> list of filenames -</dd><dt><i>project</i> (Project)</dt> +</dd> +<dt><i>project</i> (Project)</dt> <dd> reference to the project object </dd> -</dl><a NAME="RawMetricsDialog.rawMetrics" ID="RawMetricsDialog.rawMetrics"></a> +</dl> +<a NAME="RawMetricsDialog.rawMetrics" ID="RawMetricsDialog.rawMetrics"></a> <h4>RawMetricsDialog.rawMetrics</h4> <b>rawMetrics</b>(<i>codestring=''</i>) + <p> Public method to start a code metrics calculation for one Python file. -</p><p> +</p> +<p> The results are reported to the __processResult slot. -</p><dl> +</p> +<dl> + <dt><i>codestring=</i> (str)</dt> <dd> optional sourcestring </dd> -</dl><a NAME="RawMetricsDialog.rawMetricsBatch" ID="RawMetricsDialog.rawMetricsBatch"></a> +</dl> +<a NAME="RawMetricsDialog.rawMetricsBatch" ID="RawMetricsDialog.rawMetricsBatch"></a> <h4>RawMetricsDialog.rawMetricsBatch</h4> <b>rawMetricsBatch</b>(<i></i>) + <p> Public method to start a code metrics calculation batch job. -</p><p> +</p> +<p> The results are reported to the __processResult slot. -</p><a NAME="RawMetricsDialog.start" ID="RawMetricsDialog.start"></a> +</p> +<a NAME="RawMetricsDialog.start" ID="RawMetricsDialog.start"></a> <h4>RawMetricsDialog.start</h4> <b>start</b>(<i>fn</i>) + <p> Public slot to start the code metrics determination. -</p><dl> +</p> +<dl> + <dt><i>fn</i> (str or list of str)</dt> <dd> file or list of files or directory to show
--- a/RadonMetrics/Documentation/source/index-Plugin_Metrics_Radon.RadonMetrics.html Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/Documentation/source/index-Plugin_Metrics_Radon.RadonMetrics.html Tue Jun 23 19:05:15 2020 +0200 @@ -20,6 +20,7 @@ </head> <body> <h1>Plugin_Metrics_Radon.RadonMetrics</h1> + <p> Package containing the radon code metrics dialogs, supporting functions and data. @@ -28,22 +29,28 @@ <h3>Modules</h3> <table> + <tr> <td><a href="Plugin_Metrics_Radon.RadonMetrics.CodeMetricsCalculator.html">CodeMetricsCalculator</a></td> <td>Module implementing the raw code metrics service.</td> -</tr><tr> +</tr> +<tr> <td><a href="Plugin_Metrics_Radon.RadonMetrics.CyclomaticComplexityCalculator.html">CyclomaticComplexityCalculator</a></td> <td>Module implementing the cyclomatic complexity service.</td> -</tr><tr> +</tr> +<tr> <td><a href="Plugin_Metrics_Radon.RadonMetrics.CyclomaticComplexityDialog.html">CyclomaticComplexityDialog</a></td> <td>Module implementing a dialog to show the cyclomatic complexity (McCabe complexity).</td> -</tr><tr> +</tr> +<tr> <td><a href="Plugin_Metrics_Radon.RadonMetrics.MaintainabilityIndexCalculator.html">MaintainabilityIndexCalculator</a></td> <td>Module implementing the maintainability index service.</td> -</tr><tr> +</tr> +<tr> <td><a href="Plugin_Metrics_Radon.RadonMetrics.MaintainabilityIndexDialog.html">MaintainabilityIndexDialog</a></td> <td>Module implementing a dialog to show maintainability indexes.</td> -</tr><tr> +</tr> +<tr> <td><a href="Plugin_Metrics_Radon.RadonMetrics.RawMetricsDialog.html">RawMetricsDialog</a></td> <td>Module implementing a dialog to show raw code metrics.</td> </tr>
--- a/RadonMetrics/Documentation/source/index-Plugin_Metrics_Radon.html Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/Documentation/source/index-Plugin_Metrics_Radon.html Tue Jun 23 19:05:15 2020 +0200 @@ -20,12 +20,14 @@ </head> <body> <h1>Plugin_Metrics_Radon</h1> + <p> Package implementing the radon code metrics plug-in. </p> <h3>Packages</h3> <table> + <tr> <td><a href="index-Plugin_Metrics_Radon.RadonMetrics.html">RadonMetrics</a></td> <td>Package containing the radon code metrics dialogs, supporting functions and data.</td> @@ -34,6 +36,7 @@ <h3>Modules</h3> <table> + <tr> <td><a href="Plugin_Metrics_Radon.PluginMetricsRadon.html">PluginMetricsRadon</a></td> <td>Module implementing the radon code metrics plug-in.</td>
--- a/RadonMetrics/Documentation/source/index.html Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/Documentation/source/index.html Tue Jun 23 19:05:15 2020 +0200 @@ -24,6 +24,7 @@ <h3>Packages</h3> <table> + <tr> <td><a href="index-Plugin_Metrics_Radon.html">Plugin_Metrics_Radon</a></td> <td>Package implementing the radon code metrics plug-in.</td>
--- a/RadonMetrics/MaintainabilityIndexCalculator.py Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/MaintainabilityIndexCalculator.py Tue Jun 23 19:05:15 2020 +0200 @@ -7,19 +7,7 @@ Module implementing the maintainability index service. """ -from __future__ import unicode_literals - -try: - str = unicode # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ -except NameError: - pass - -try: - import Queue as queue # Py2 -except ImportError: - import queue - -import sys +import queue import multiprocessing @@ -95,8 +83,8 @@ # Start worker processes for _ in range(NumberOfProcesses): - multiprocessing.Process(target=worker, args=(taskQueue, doneQueue))\ - .start() + multiprocessing.Process( + target=worker, args=(taskQueue, doneQueue)).start() # Get and send results endIndex = len(argumentsList) - initialTasks @@ -157,13 +145,6 @@ """ from radon.metrics import mi_visit, mi_rank - # Check type for py2: if not str it's unicode - if sys.version_info[0] == 2: - try: - text = text.encode('utf-8') - except UnicodeError: - pass - try: mi = mi_visit(text, True) rank = mi_rank(mi)
--- a/RadonMetrics/MaintainabilityIndexDialog.py Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/MaintainabilityIndexDialog.py Tue Jun 23 19:05:15 2020 +0200 @@ -7,13 +7,6 @@ Module implementing a dialog to show maintainability indexes. """ -from __future__ import unicode_literals - -try: - str = unicode # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ -except NameError: - pass - import os import fnmatch @@ -218,7 +211,7 @@ # now go through all the files self.progress = 0 - if len(self.files) == 1 or not self.radonService.hasBatch: + if len(self.files) == 1: self.__batch = False self.maintainabilityIndex() else: @@ -424,8 +417,10 @@ fileList = self.__fileList[:] filterString = self.excludeFilesEdit.text() - if "ExcludeFiles" not in self.__data or \ - filterString != self.__data["ExcludeFiles"]: + if ( + "ExcludeFiles" not in self.__data or + filterString != self.__data["ExcludeFiles"] + ): self.__data["ExcludeFiles"] = filterString self.__project.setData( "OTHERTOOLSPARMS", "RadonCodeMetrics", self.__data) @@ -433,8 +428,8 @@ if f.strip()] if filterList: for fileFilter in filterList: - fileList = \ - [f for f in fileList if not fnmatch.fnmatch(f, fileFilter)] + fileList = [f for f in fileList + if not fnmatch.fnmatch(f, fileFilter)] self.start(fileList)
--- a/RadonMetrics/RawMetricsDialog.py Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/RawMetricsDialog.py Tue Jun 23 19:05:15 2020 +0200 @@ -7,13 +7,6 @@ Module implementing a dialog to show raw code metrics. """ -from __future__ import unicode_literals - -try: - str = unicode # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ -except NameError: - pass - import os import fnmatch @@ -232,7 +225,7 @@ # now go through all the files self.progress = 0 - if len(self.files) == 1 or not self.radonService.hasBatch: + if len(self.files) == 1: self.__batch = False self.rawMetrics() else: @@ -486,8 +479,10 @@ fileList = self.__fileList[:] filterString = self.excludeFilesEdit.text() - if "ExcludeFiles" not in self.__data or \ - filterString != self.__data["ExcludeFiles"]: + if ( + "ExcludeFiles" not in self.__data or + filterString != self.__data["ExcludeFiles"] + ): self.__data["ExcludeFiles"] = filterString self.__project.setData( "OTHERTOOLSPARMS", "RadonCodeMetrics", self.__data) @@ -495,8 +490,8 @@ if f.strip()] if filterList: for fileFilter in filterList: - fileList = \ - [f for f in fileList if not fnmatch.fnmatch(f, fileFilter)] + fileList = [f for f in fileList + if not fnmatch.fnmatch(f, fileFilter)] self.start(fileList)
--- a/RadonMetrics/i18n/radon_de.ts Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/i18n/radon_de.ts Tue Jun 23 19:05:15 2020 +0200 @@ -55,22 +55,22 @@ <translation>%v/%m Dateien</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="85"/> + <location filename="../CyclomaticComplexityDialog.py" line="78"/> <source><table><tr><td colspan=3><b>Ranking:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(low risk - simple block)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(low risk - well structured and stable block)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(moderate risk - slightly complex block)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(more than moderate risk - more complex block)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(high risk - complex block, alarming)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(very high risk - error-prone, unstable block)</td></tr></table></source> <translation><table><tr><td colspan=3><b>Bewertung:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(geringes Risiko - einfacher Block)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(geringes Risika - gut strukturierter und stabiler Block)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(moderates Risiko - etwas komplexerer Block)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(mehr als moderates Risiko - komplexerer Block)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(hohes Risiko - komplexer Block, alarmierend)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(sehr hohes Risiko - fehleranfälliger, instabiler Block)</td></tr></table></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="102"/> + <location filename="../CyclomaticComplexityDialog.py" line="95"/> <source><table><tr><td colspan=2><b>Type:</b></td></tr><tr><td><b>C</b></td><td>Class</td></tr><tr><td><b>F</b></td><td>Function</td></tr><tr><td><b>M</b></td><td>Method</td></tr></table></source> <translation><table><tr><td colspan=2><b>Typ:</b></td></tr><tr><td><b>C</b></td><td>Klasse</td></tr><tr><td><b>F</b></td><td>Funktion</td></tr><tr><td><b>M</b></td><td>Methode</td></tr></table></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="206"/> + <location filename="../CyclomaticComplexityDialog.py" line="199"/> <source>Errors</source> <translation>Fehler</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="367"/> + <location filename="../CyclomaticComplexityDialog.py" line="360"/> <source>Preparing files...</source> <translation>Bereite Dateien vor...</translation> </message> @@ -90,12 +90,12 @@ <translation>Anfang</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="131"/> + <location filename="../CyclomaticComplexityDialog.py" line="124"/> <source>Collapse all</source> <translation>Alle Zuklappen</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="133"/> + <location filename="../CyclomaticComplexityDialog.py" line="126"/> <source>Expand all</source> <translation>Alle Aufklappen</translation> </message> @@ -110,7 +110,7 @@ <translation>Wähle die Mindestbewertung anzuzeigender Einträge</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="497"/> + <location filename="../CyclomaticComplexityDialog.py" line="490"/> <source><b>Summary:</b><br/>{0} blocks (classes, functions, methods) analyzed.<br/>Average complexity: {7} ({8})<table><tr><td width=30><b>A</b></td><td align='right'>{1} blocks</td></tr><tr><td width=30><b>B</b></td><td align='right'>{2} blocks</td></tr><tr><td width=30><b>C</b></td><td align='right'>{3} blocks</td></tr><tr><td width=30><b>D</b></td><td align='right'>{4} blocks</td></tr><tr><td width=30><b>E</b></td><td align='right'>{5} blocks</td></tr><tr><td width=30><b>F</b></td><td align='right'>{6} blocks</td></tr></table></source> <translation><b>Zusammenfassung:</b><br/>{0} Blöcke (Klassen, Funktionen, Methoden) analysiert.<br/>Mittlere Komplexität: {7} ({8})<table><tr><td width=30><b>A</b></td><td align='right'>{1} Blöcke</td></tr><tr><td width=30><b>B</b></td><td align='right'>{2} Blöcke</td></tr><tr><td width=30><b>C</b></td><td align='right'>{3} Blöcke</td></tr><tr><td width=30><b>D</b></td><td align='right'>{4} Blöcke</td></tr><tr><td width=30><b>E</b></td><td align='right'>{5} Blöcke</td></tr><tr><td width=30><b>F</b></td><td align='right'>{6} Blöcke</td></tr></table></translation> </message> @@ -158,12 +158,12 @@ <translation>%v/%m Dateien</translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="131"/> + <location filename="../MaintainabilityIndexDialog.py" line="124"/> <source>Errors</source> <translation>Fehler</translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="275"/> + <location filename="../MaintainabilityIndexDialog.py" line="268"/> <source>Preparing files...</source> <translation>Bereite Dateien vor...</translation> </message> @@ -185,12 +185,12 @@ <p>Dieser Dialog zeigt den Wartbarkeitsindex und eine Bewertung.</p></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="387"/> + <location filename="../MaintainabilityIndexDialog.py" line="380"/> <source><table><tr><td colspan=2><b>Summary:</b></td></tr><tr><td><b>A</b></td><td align='right'>{0} files</td></tr><tr><td><b>B</b></td><td align='right'>{1} files</td></tr><tr><td><b>C</b></td><td align='right'>{2} files</td></tr></table></source> <translation><table><tr><td colspan=2><b>Zusammenfassung:</b></td></tr><tr><td><b>A</b></td><td align='right'>{0} Dateien</td></tr><tr><td><b>B</b></td><td align='right'>{1} Dateien</td></tr><tr><td><b>C</b></td><td align='right'>{2} Dateien</td></tr></table></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="73"/> + <location filename="../MaintainabilityIndexDialog.py" line="66"/> <source><table><tr><td><b>Rank</b></td><td><b>MI Score</b></td><td><b>Maintainability</b></td></tr><tr><td><b>A</b></td><td>100 - 20</td><td>very high</td></tr><tr><td><b>B</b></td><td>19 - 10</td><td>medium</td></tr><tr><td><b>C</b></td><td>9 - 0</td><td>extremely low</td></tr></table></source> <translation><table><tr><td><b>Rang</b></td><td><b>Wert</b></td><td><b>Wartbarkeit</b></td></tr><tr><td><b>A</b></td><td>100 - 20</td><td>sehr hoch</td></tr><tr><td><b>B</b></td><td>19 - 10</td><td>mittel</td></tr><tr><td><b>C</b></td><td>9 - 0</td><td>extrem niedrig</td></tr></table></translation> </message> @@ -198,87 +198,82 @@ <context> <name>RadonMetricsPlugin</name> <message> - <location filename="../../PluginMetricsRadon.py" line="221"/> - <source>Python 2 batch job</source> - <translation>Python 2 Stapelprüfung</translation> - </message> - <message> - <location filename="../../PluginMetricsRadon.py" line="244"/> + <location filename="../../PluginMetricsRadon.py" line="154"/> <source>Python 3 batch job</source> <translation>Python 3 Stapelprüfung</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="285"/> + <location filename="../../PluginMetricsRadon.py" line="197"/> <source>Unknown metrics result received ({0}).</source> <translation>Unbekannte Metrik empfangen ({0}).</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1051"/> + <location filename="../../PluginMetricsRadon.py" line="949"/> <source>Radon</source> <translation>Radon</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="741"/> + <location filename="../../PluginMetricsRadon.py" line="633"/> <source>Code Metrics</source> <translation>Quelltextmetriken</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="741"/> + <location filename="../../PluginMetricsRadon.py" line="633"/> <source>Code &Metrics...</source> <translation>Quelltext&metriken...</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="745"/> + <location filename="../../PluginMetricsRadon.py" line="637"/> <source>Show raw code metrics.</source> <translation>Zeige einige Quelltextmetriken an.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="747"/> + <location filename="../../PluginMetricsRadon.py" line="639"/> <source><b>Code Metrics...</b><p>This calculates raw code metrics of Python files and shows the amount of lines of code, logical lines of code, source lines of code, comment lines, multi-line strings and blank lines.</p></source> <translation><b>Quelltextmetriken...</b><p>Dies ermittelt einige Quelltextmetriken für Python Dateien und zeigt die Anzahl der Textzeilen, logischen Quelltextzeilen, Quelltextzeilen, Kommentarzeilen, mehrzeiligen Zeichenketten und Lerrzeilen.</p></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="758"/> + <location filename="../../PluginMetricsRadon.py" line="650"/> <source>Maintainability Index</source> <translation>Wartbarkeitsindex</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="758"/> + <location filename="../../PluginMetricsRadon.py" line="650"/> <source>Maintainability &Index...</source> <translation>Wartbarkeits&index...</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="762"/> + <location filename="../../PluginMetricsRadon.py" line="654"/> <source>Show the maintainability index for Python files.</source> <translation>Zeigt den Wartbarkeitsindex für Python Dateien an.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="764"/> + <location filename="../../PluginMetricsRadon.py" line="656"/> <source><b>Maintainability Index...</b><p>This calculates the maintainability index of Python files and shows it together with a ranking.</p></source> <translation><b>Wartbarkeitsindex...</b><p>Dies ermittelt den Wartbarkeitsindex für Python Dateien und zeigt ihn zusammen mit einer Bewertung an.</p></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="775"/> + <location filename="../../PluginMetricsRadon.py" line="667"/> <source>Cyclomatic Complexity</source> <translation>Zyklomatische Komplexität</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="775"/> + <location filename="../../PluginMetricsRadon.py" line="667"/> <source>Cyclomatic &Complexity...</source> <translation>Zyklomatische &Komplexität...</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="779"/> + <location filename="../../PluginMetricsRadon.py" line="671"/> <source>Show the cyclomatic complexity for Python files.</source> <translation>Zeigt die zyklomatische Komplexität für Python Dateien an.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="781"/> + <location filename="../../PluginMetricsRadon.py" line="673"/> <source><b>Cyclomatic Complexity...</b><p>This calculates the cyclomatic complexity of Python files and shows it together with a ranking.</p></source> <translation><b>Zyklomatische Komplexität...</b><p>Dies ermittelt die zyklomatische Komplexität von Python Dateien und zeigt sie zusammen mit einer Bewertung an.</p></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1051"/> + <location filename="../../PluginMetricsRadon.py" line="949"/> <source><p><b>Radon Version {0}</b></p><p>Radon is a Python tool that computes various metrics from the source code. Radon can compute:<ul><li><b>Raw</b> metrics (these include SLOC, comment lines, blank lines, multi line strings, ...)</li><li><b>Maintainability Index</b> (the one used in Visual Studio)</li><li><b>McCabe's complexity</b>, i.e. cyclomatic complexity</li></ul></p></source> <translation><p><b>Radon Version {0}</b><p>Radon ist ein Werkzeug, das verschiedene Metriken für Python Quelltexte ermittelt. Radon kann die folgenden Metriken ermitteln:<ul><li><b>Quelltext</b>metrik (dies beinhaltet Quelltextzeilen, Kommentarzeilen, Leerzeilen, mehrzeilige Zeichenketten, ...)</li><li><b>Wartbarkeitsindex</b> (wie von Visual Studio)</li><li><b>McCabe Komplexität</b>, d.h. zyklomatische Komplexität</li></ul></p></translation> </message> @@ -318,17 +313,17 @@ <translation>Name</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="432"/> + <location filename="../RawMetricsDialog.py" line="425"/> <source>LOC</source> <translation>LOC</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="434"/> + <location filename="../RawMetricsDialog.py" line="427"/> <source>SLOC</source> <translation>SLOC</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="436"/> + <location filename="../RawMetricsDialog.py" line="429"/> <source>LLOC</source> <translation>LLOC</translation> </message> @@ -378,17 +373,17 @@ <translation>%v/%m Dateien</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="146"/> + <location filename="../RawMetricsDialog.py" line="139"/> <source>Errors</source> <translation>Fehler</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="288"/> + <location filename="../RawMetricsDialog.py" line="281"/> <source>Preparing files...</source> <translation>Bereite Dateien vor...</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="430"/> + <location filename="../RawMetricsDialog.py" line="423"/> <source>Files</source> <translation>Dateien</translation> </message> @@ -403,27 +398,27 @@ <translation>Zeigt den Fortschritt der Berechnung</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="438"/> + <location filename="../RawMetricsDialog.py" line="431"/> <source>Comment Lines</source> <translation>Kommentarzeilen</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="444"/> + <location filename="../RawMetricsDialog.py" line="437"/> <source>Multiline Strings</source> <translation>Mehrzeiligen Zeichenketten</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="447"/> + <location filename="../RawMetricsDialog.py" line="440"/> <source>Empty Lines</source> <translation>Leerzeilen</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="441"/> + <location filename="../RawMetricsDialog.py" line="434"/> <source>Empty Comments</source> <translation>Leere Kommentare</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="78"/> + <location filename="../RawMetricsDialog.py" line="71"/> <source><table><tr><td><b>LOC</b></td><td>Lines of code</td></tr><tr><td><b>SLOC</b></td><td>Source lines of code</td></tr><tr><td><b>LLOC</b></td><td>Logical lines of code</td></tr><tr><td><b>Comments</b></td><td>Comment lines</td></tr><tr><td><b>Empty&nbsp;Comments</b></td><td>Comment lines not containing code</td></tr><tr><td><b>Multi</b></td><td>Lines in multi line strings</td></tr><tr><td><b>Empty</b></td><td>Blank lines</td></tr><tr><td colspan=2><b>Comment Statistics:</b></td</tr><tr><td><b>C % L</b></td><td>Comments to lines ratio</td></tr><tr><td><b>C % S</b></td><td>Comments to source lines ratio</td></tr><tr><td><b>C + M % L</b></td><td>Comments plus multi line strings to lines ratio</td></tr></table></source> <translation><table><tr><td><b>LOC</b></td><td>Textzeilen</td></tr><tr><td><b>SLOC</b></td><td>Quelltextzeilen</td></tr><tr><td><b>LLOC</b></td><td>Logische Quelltextzeilen</td></tr><tr><td><b>Kommentare</b></td><td>Kommentarzeilen</td></tr><tr><b>Leere&nbsp;Kommentare</b></td><td>Kommentarzeilen ohne Inhalt</td></tr><tr><td><b>Mehrfach</b></td><td>Zeilen in mehrzeiligen Zeichenketten</td></tr><tr><td><b>Leer</b></td><td>Leerzeilen</td></tr><tr><td colspan=2><b>Kommentarstatistiken:</b></td</tr><tr><td><b>K % L</b></td><td>Verhältnis Kommentare zu Textzeilen</td></tr><tr><td><b>K % S</b></td><td>Verhältnis Kommentare zu Quelltextzeilen</td></tr><tr><td><b>K + M % L</b></td><td>Verhältnis der Summe aus Kommentaren und mehrzeiliger Zeichenketten zu Textzeilen</td></tr></table></translation> </message>
--- a/RadonMetrics/i18n/radon_en.ts Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/i18n/radon_en.ts Tue Jun 23 19:05:15 2020 +0200 @@ -54,22 +54,22 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="85"/> + <location filename="../CyclomaticComplexityDialog.py" line="78"/> <source><table><tr><td colspan=3><b>Ranking:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(low risk - simple block)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(low risk - well structured and stable block)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(moderate risk - slightly complex block)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(more than moderate risk - more complex block)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(high risk - complex block, alarming)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(very high risk - error-prone, unstable block)</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="102"/> + <location filename="../CyclomaticComplexityDialog.py" line="95"/> <source><table><tr><td colspan=2><b>Type:</b></td></tr><tr><td><b>C</b></td><td>Class</td></tr><tr><td><b>F</b></td><td>Function</td></tr><tr><td><b>M</b></td><td>Method</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="206"/> + <location filename="../CyclomaticComplexityDialog.py" line="199"/> <source>Errors</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="367"/> + <location filename="../CyclomaticComplexityDialog.py" line="360"/> <source>Preparing files...</source> <translation type="unfinished"></translation> </message> @@ -89,12 +89,12 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="131"/> + <location filename="../CyclomaticComplexityDialog.py" line="124"/> <source>Collapse all</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="133"/> + <location filename="../CyclomaticComplexityDialog.py" line="126"/> <source>Expand all</source> <translation type="unfinished"></translation> </message> @@ -109,7 +109,7 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="497"/> + <location filename="../CyclomaticComplexityDialog.py" line="490"/> <source><b>Summary:</b><br/>{0} blocks (classes, functions, methods) analyzed.<br/>Average complexity: {7} ({8})<table><tr><td width=30><b>A</b></td><td align='right'>{1} blocks</td></tr><tr><td width=30><b>B</b></td><td align='right'>{2} blocks</td></tr><tr><td width=30><b>C</b></td><td align='right'>{3} blocks</td></tr><tr><td width=30><b>D</b></td><td align='right'>{4} blocks</td></tr><tr><td width=30><b>E</b></td><td align='right'>{5} blocks</td></tr><tr><td width=30><b>F</b></td><td align='right'>{6} blocks</td></tr></table></source> <translation type="unfinished"></translation> </message> @@ -157,12 +157,12 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="131"/> + <location filename="../MaintainabilityIndexDialog.py" line="124"/> <source>Errors</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="275"/> + <location filename="../MaintainabilityIndexDialog.py" line="268"/> <source>Preparing files...</source> <translation type="unfinished"></translation> </message> @@ -183,12 +183,12 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="387"/> + <location filename="../MaintainabilityIndexDialog.py" line="380"/> <source><table><tr><td colspan=2><b>Summary:</b></td></tr><tr><td><b>A</b></td><td align='right'>{0} files</td></tr><tr><td><b>B</b></td><td align='right'>{1} files</td></tr><tr><td><b>C</b></td><td align='right'>{2} files</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="73"/> + <location filename="../MaintainabilityIndexDialog.py" line="66"/> <source><table><tr><td><b>Rank</b></td><td><b>MI Score</b></td><td><b>Maintainability</b></td></tr><tr><td><b>A</b></td><td>100 - 20</td><td>very high</td></tr><tr><td><b>B</b></td><td>19 - 10</td><td>medium</td></tr><tr><td><b>C</b></td><td>9 - 0</td><td>extremely low</td></tr></table></source> <translation type="unfinished"></translation> </message> @@ -196,87 +196,82 @@ <context> <name>RadonMetricsPlugin</name> <message> - <location filename="../../PluginMetricsRadon.py" line="221"/> - <source>Python 2 batch job</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../PluginMetricsRadon.py" line="244"/> + <location filename="../../PluginMetricsRadon.py" line="154"/> <source>Python 3 batch job</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="285"/> + <location filename="../../PluginMetricsRadon.py" line="197"/> <source>Unknown metrics result received ({0}).</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1051"/> + <location filename="../../PluginMetricsRadon.py" line="949"/> <source>Radon</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="741"/> + <location filename="../../PluginMetricsRadon.py" line="633"/> <source>Code Metrics</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="741"/> + <location filename="../../PluginMetricsRadon.py" line="633"/> <source>Code &Metrics...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="745"/> + <location filename="../../PluginMetricsRadon.py" line="637"/> <source>Show raw code metrics.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="747"/> + <location filename="../../PluginMetricsRadon.py" line="639"/> <source><b>Code Metrics...</b><p>This calculates raw code metrics of Python files and shows the amount of lines of code, logical lines of code, source lines of code, comment lines, multi-line strings and blank lines.</p></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="758"/> + <location filename="../../PluginMetricsRadon.py" line="650"/> <source>Maintainability Index</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="758"/> + <location filename="../../PluginMetricsRadon.py" line="650"/> <source>Maintainability &Index...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="762"/> + <location filename="../../PluginMetricsRadon.py" line="654"/> <source>Show the maintainability index for Python files.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="764"/> + <location filename="../../PluginMetricsRadon.py" line="656"/> <source><b>Maintainability Index...</b><p>This calculates the maintainability index of Python files and shows it together with a ranking.</p></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="775"/> + <location filename="../../PluginMetricsRadon.py" line="667"/> <source>Cyclomatic Complexity</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="775"/> + <location filename="../../PluginMetricsRadon.py" line="667"/> <source>Cyclomatic &Complexity...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="779"/> + <location filename="../../PluginMetricsRadon.py" line="671"/> <source>Show the cyclomatic complexity for Python files.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="781"/> + <location filename="../../PluginMetricsRadon.py" line="673"/> <source><b>Cyclomatic Complexity...</b><p>This calculates the cyclomatic complexity of Python files and shows it together with a ranking.</p></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1051"/> + <location filename="../../PluginMetricsRadon.py" line="949"/> <source><p><b>Radon Version {0}</b></p><p>Radon is a Python tool that computes various metrics from the source code. Radon can compute:<ul><li><b>Raw</b> metrics (these include SLOC, comment lines, blank lines, multi line strings, ...)</li><li><b>Maintainability Index</b> (the one used in Visual Studio)</li><li><b>McCabe's complexity</b>, i.e. cyclomatic complexity</li></ul></p></source> <translation type="unfinished"></translation> </message> @@ -315,17 +310,17 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="432"/> + <location filename="../RawMetricsDialog.py" line="425"/> <source>LOC</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="434"/> + <location filename="../RawMetricsDialog.py" line="427"/> <source>SLOC</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="436"/> + <location filename="../RawMetricsDialog.py" line="429"/> <source>LLOC</source> <translation type="unfinished"></translation> </message> @@ -375,17 +370,17 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="146"/> + <location filename="../RawMetricsDialog.py" line="139"/> <source>Errors</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="288"/> + <location filename="../RawMetricsDialog.py" line="281"/> <source>Preparing files...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="430"/> + <location filename="../RawMetricsDialog.py" line="423"/> <source>Files</source> <translation type="unfinished"></translation> </message> @@ -400,27 +395,27 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="438"/> + <location filename="../RawMetricsDialog.py" line="431"/> <source>Comment Lines</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="444"/> + <location filename="../RawMetricsDialog.py" line="437"/> <source>Multiline Strings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="447"/> + <location filename="../RawMetricsDialog.py" line="440"/> <source>Empty Lines</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="441"/> + <location filename="../RawMetricsDialog.py" line="434"/> <source>Empty Comments</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="78"/> + <location filename="../RawMetricsDialog.py" line="71"/> <source><table><tr><td><b>LOC</b></td><td>Lines of code</td></tr><tr><td><b>SLOC</b></td><td>Source lines of code</td></tr><tr><td><b>LLOC</b></td><td>Logical lines of code</td></tr><tr><td><b>Comments</b></td><td>Comment lines</td></tr><tr><td><b>Empty&nbsp;Comments</b></td><td>Comment lines not containing code</td></tr><tr><td><b>Multi</b></td><td>Lines in multi line strings</td></tr><tr><td><b>Empty</b></td><td>Blank lines</td></tr><tr><td colspan=2><b>Comment Statistics:</b></td</tr><tr><td><b>C % L</b></td><td>Comments to lines ratio</td></tr><tr><td><b>C % S</b></td><td>Comments to source lines ratio</td></tr><tr><td><b>C + M % L</b></td><td>Comments plus multi line strings to lines ratio</td></tr></table></source> <translation type="unfinished"></translation> </message>
--- a/RadonMetrics/i18n/radon_es.ts Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/i18n/radon_es.ts Tue Jun 23 19:05:15 2020 +0200 @@ -55,22 +55,22 @@ <translation>%v/%m Archivos</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="85"/> + <location filename="../CyclomaticComplexityDialog.py" line="78"/> <source><table><tr><td colspan=3><b>Ranking:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(low risk - simple block)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(low risk - well structured and stable block)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(moderate risk - slightly complex block)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(more than moderate risk - more complex block)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(high risk - complex block, alarming)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(very high risk - error-prone, unstable block)</td></tr></table></source> <translation><table><tr><td colspan=3><b>Ranking:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(riesgo bajo - bloque simple)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(riesgo bajo - bloque estable y bién estructurado)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(riesgo moderado - bloque ligeramente complejo)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(riesgo más que moderado- bloque más complejo)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(riesgo alto- bloque complejo, alarmante)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(riesgo muy alto, - propenso a errores, bloque inestable)</td></tr></table></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="102"/> + <location filename="../CyclomaticComplexityDialog.py" line="95"/> <source><table><tr><td colspan=2><b>Type:</b></td></tr><tr><td><b>C</b></td><td>Class</td></tr><tr><td><b>F</b></td><td>Function</td></tr><tr><td><b>M</b></td><td>Method</td></tr></table></source> <translation><table><tr><td colspan=2><b>Type:</b></td></tr><tr><td><b>C</b></td><td>Clase</td></tr><tr><td><b>F</b></td><td>Función</td></tr><tr><td><b>M</b></td><td>Método</td></tr></table></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="206"/> + <location filename="../CyclomaticComplexityDialog.py" line="199"/> <source>Errors</source> <translation>Errores</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="367"/> + <location filename="../CyclomaticComplexityDialog.py" line="360"/> <source>Preparing files...</source> <translation>Preparando archivos...</translation> </message> @@ -90,12 +90,12 @@ <translation>Muestra el progreso del cálculo</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="131"/> + <location filename="../CyclomaticComplexityDialog.py" line="124"/> <source>Collapse all</source> <translation>Contraer todos</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="133"/> + <location filename="../CyclomaticComplexityDialog.py" line="126"/> <source>Expand all</source> <translation>Expandir todos</translation> </message> @@ -110,7 +110,7 @@ <translation>Seleccionar el rango mínimo para los elementos a mostrar</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="497"/> + <location filename="../CyclomaticComplexityDialog.py" line="490"/> <source><b>Summary:</b><br/>{0} blocks (classes, functions, methods) analyzed.<br/>Average complexity: {7} ({8})<table><tr><td width=30><b>A</b></td><td align='right'>{1} blocks</td></tr><tr><td width=30><b>B</b></td><td align='right'>{2} blocks</td></tr><tr><td width=30><b>C</b></td><td align='right'>{3} blocks</td></tr><tr><td width=30><b>D</b></td><td align='right'>{4} blocks</td></tr><tr><td width=30><b>E</b></td><td align='right'>{5} blocks</td></tr><tr><td width=30><b>F</b></td><td align='right'>{6} blocks</td></tr></table></source> <translation><b>Resumen:</b><br/>{0} bloques (clases, funciones, métodos) analyzed.<br/>Complejidad media: {7} ({8})<table><tr><td width=30><b>A</b></td><td align='right'>{1} bloques</td></tr><tr><td width=30><b>B</b></td><td align='right'>{2} bloques</td></tr><tr><td width=30><b>C</b></td><td align='right'>{3} bloques</td></tr><tr><td width=30><b>D</b></td><td align='right'>{4} bloques</td></tr><tr><td width=30><b>E</b></td><td align='right'>{5} bloques</td></tr><tr><td width=30><b>F</b></td><td align='right'>{6} bloques</td></tr></table></translation> </message> @@ -158,12 +158,12 @@ <translation>%v/%m Archivos</translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="131"/> + <location filename="../MaintainabilityIndexDialog.py" line="124"/> <source>Errors</source> <translation>Errores</translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="275"/> + <location filename="../MaintainabilityIndexDialog.py" line="268"/> <source>Preparing files...</source> <translation>Preparando archivos...</translation> </message> @@ -185,12 +185,12 @@ <p>Este diálogo muestra el índice de mantenimiento y rango.</p></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="387"/> + <location filename="../MaintainabilityIndexDialog.py" line="380"/> <source><table><tr><td colspan=2><b>Summary:</b></td></tr><tr><td><b>A</b></td><td align='right'>{0} files</td></tr><tr><td><b>B</b></td><td align='right'>{1} files</td></tr><tr><td><b>C</b></td><td align='right'>{2} files</td></tr></table></source> <translation><table><tr><td colspan=2><b>Resumen:</b></td></tr><tr><td><b>A</b></td><td align='right'>{0} archivos</td></tr><tr><td><b>B</b></td><td align='right'>{1} archivos</td></tr><tr><td><b>C</b></td><td align='right'>{2} archivos</td></tr></table></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="73"/> + <location filename="../MaintainabilityIndexDialog.py" line="66"/> <source><table><tr><td><b>Rank</b></td><td><b>MI Score</b></td><td><b>Maintainability</b></td></tr><tr><td><b>A</b></td><td>100 - 20</td><td>very high</td></tr><tr><td><b>B</b></td><td>19 - 10</td><td>medium</td></tr><tr><td><b>C</b></td><td>9 - 0</td><td>extremely low</td></tr></table></source> <translation type="unfinished"></translation> </message> @@ -198,87 +198,82 @@ <context> <name>RadonMetricsPlugin</name> <message> - <location filename="../../PluginMetricsRadon.py" line="221"/> - <source>Python 2 batch job</source> - <translation>Trabajo por lotes de Python 2</translation> - </message> - <message> - <location filename="../../PluginMetricsRadon.py" line="244"/> + <location filename="../../PluginMetricsRadon.py" line="154"/> <source>Python 3 batch job</source> <translation>Trabajo por lotes de Python 3</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="285"/> + <location filename="../../PluginMetricsRadon.py" line="197"/> <source>Unknown metrics result received ({0}).</source> <translation>Recibido resultado de métricas desconocidas ({0}).</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1051"/> + <location filename="../../PluginMetricsRadon.py" line="949"/> <source>Radon</source> <translation>Radon</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="741"/> + <location filename="../../PluginMetricsRadon.py" line="633"/> <source>Code Metrics</source> <translation>Métricas de Código</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="741"/> + <location filename="../../PluginMetricsRadon.py" line="633"/> <source>Code &Metrics...</source> <translation>&Métricas de Código...</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="745"/> + <location filename="../../PluginMetricsRadon.py" line="637"/> <source>Show raw code metrics.</source> <translation>Mostrar métricas de código en bruto.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="747"/> + <location filename="../../PluginMetricsRadon.py" line="639"/> <source><b>Code Metrics...</b><p>This calculates raw code metrics of Python files and shows the amount of lines of code, logical lines of code, source lines of code, comment lines, multi-line strings and blank lines.</p></source> <translation><b>Métricas de Código...<b><p>Calcula las métricas de código en bruto de archivos Python y muestra el número de líneas de código, líneas lógicas de código, líneas fuente de código, líneas en comentarios, cadenas multilínea y líneas en blanco.</p></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="758"/> + <location filename="../../PluginMetricsRadon.py" line="650"/> <source>Maintainability Index</source> <translation>Índice de Mantenibilidad</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="758"/> + <location filename="../../PluginMetricsRadon.py" line="650"/> <source>Maintainability &Index...</source> <translation>&Índice de Mantenibilidad...</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="762"/> + <location filename="../../PluginMetricsRadon.py" line="654"/> <source>Show the maintainability index for Python files.</source> <translation>Muestra el índice de mantenibilidad para archivos Python.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="764"/> + <location filename="../../PluginMetricsRadon.py" line="656"/> <source><b>Maintainability Index...</b><p>This calculates the maintainability index of Python files and shows it together with a ranking.</p></source> <translation><b>Índice de Mantenibilidad...</b><p>Calcula el índice de mantenibilidad de archivos Python y lo muestra con un ranking.</p></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="775"/> + <location filename="../../PluginMetricsRadon.py" line="667"/> <source>Cyclomatic Complexity</source> <translation>Complejidad Ciclomática</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="775"/> + <location filename="../../PluginMetricsRadon.py" line="667"/> <source>Cyclomatic &Complexity...</source> <translation>Complejidad &Ciclomática...</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="779"/> + <location filename="../../PluginMetricsRadon.py" line="671"/> <source>Show the cyclomatic complexity for Python files.</source> <translation>Muestra la complejidad ciclomática para archivos Python.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="781"/> + <location filename="../../PluginMetricsRadon.py" line="673"/> <source><b>Cyclomatic Complexity...</b><p>This calculates the cyclomatic complexity of Python files and shows it together with a ranking.</p></source> <translation><b>Complejidad Ciclomática...</b><p>Calcula la complejidad ciclomática de archivos Python y lo muestra con un ranking.</p></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1051"/> + <location filename="../../PluginMetricsRadon.py" line="949"/> <source><p><b>Radon Version {0}</b></p><p>Radon is a Python tool that computes various metrics from the source code. Radon can compute:<ul><li><b>Raw</b> metrics (these include SLOC, comment lines, blank lines, multi line strings, ...)</li><li><b>Maintainability Index</b> (the one used in Visual Studio)</li><li><b>McCabe's complexity</b>, i.e. cyclomatic complexity</li></ul></p></source> <translation><p><b>Radon Versión {0}</b></p><p>Radon es una herramienta de Python que calcula varias métricas a partir del código fuente. Radon puede calcular:<ul><li>Métricas <b>en bruto</b> (incluyen SLOC -líneas de código fuente-, líneas de comentarios, líneas en blanco, cadenas multilínea, ...)</li><li><b>Índice de Mantenibilidad</b> (el que se utiliza en Visual Studio)</li><li><b>complejidad de McCabe</b>, complejidad ciclomática</li></ul></p></translation> </message> @@ -318,17 +313,17 @@ <translation>Nombre</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="432"/> + <location filename="../RawMetricsDialog.py" line="425"/> <source>LOC</source> <translation>LOC</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="434"/> + <location filename="../RawMetricsDialog.py" line="427"/> <source>SLOC</source> <translation>SLOC</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="436"/> + <location filename="../RawMetricsDialog.py" line="429"/> <source>LLOC</source> <translation>LLOC</translation> </message> @@ -378,17 +373,17 @@ <translation>%v/%m Archivos</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="146"/> + <location filename="../RawMetricsDialog.py" line="139"/> <source>Errors</source> <translation>Errores</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="288"/> + <location filename="../RawMetricsDialog.py" line="281"/> <source>Preparing files...</source> <translation>Preparando archivos...</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="430"/> + <location filename="../RawMetricsDialog.py" line="423"/> <source>Files</source> <translation>Archivos</translation> </message> @@ -403,27 +398,27 @@ <translation>Muestra el progreso del cálculo</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="438"/> + <location filename="../RawMetricsDialog.py" line="431"/> <source>Comment Lines</source> <translation>Líneas de Comentarios</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="444"/> + <location filename="../RawMetricsDialog.py" line="437"/> <source>Multiline Strings</source> <translation>Cadenas Multilínea</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="447"/> + <location filename="../RawMetricsDialog.py" line="440"/> <source>Empty Lines</source> <translation>Líneas en Blanco</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="441"/> + <location filename="../RawMetricsDialog.py" line="434"/> <source>Empty Comments</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="78"/> + <location filename="../RawMetricsDialog.py" line="71"/> <source><table><tr><td><b>LOC</b></td><td>Lines of code</td></tr><tr><td><b>SLOC</b></td><td>Source lines of code</td></tr><tr><td><b>LLOC</b></td><td>Logical lines of code</td></tr><tr><td><b>Comments</b></td><td>Comment lines</td></tr><tr><td><b>Empty&nbsp;Comments</b></td><td>Comment lines not containing code</td></tr><tr><td><b>Multi</b></td><td>Lines in multi line strings</td></tr><tr><td><b>Empty</b></td><td>Blank lines</td></tr><tr><td colspan=2><b>Comment Statistics:</b></td</tr><tr><td><b>C % L</b></td><td>Comments to lines ratio</td></tr><tr><td><b>C % S</b></td><td>Comments to source lines ratio</td></tr><tr><td><b>C + M % L</b></td><td>Comments plus multi line strings to lines ratio</td></tr></table></source> <translation><table><tr><td><b>LOC</b></td><td>Líneas de código</td></tr><tr><td><b>SLOC</b></td><td>Líneas de código fuente</td></tr><tr><td><b>LLOC</b></td><td>Líneas logicas de código</td></tr><tr><td><b>Comentarios</b></td><td>Líneas de comentarios</td></tr><tr><td><b>Multi</b></td><td>Líneas en cadenas multilínea</td></tr><tr><td><b>Vacío</b></td><td>Líneas en blanco</td></tr><tr><td colspan=2><b>Estadísticas de Comentarios:</b></td</tr><tr><td><b>C % L</b></td><td>Ratio entre comentarios y líneas</td></tr><tr><td><b>C % S</b></td><td>Ratio entre comentarios y líneas de código fuente</td></tr><tr><td><b>C + M % L</b></td><td>Ratio entre comentarios más cadenas multilínea y líneas</td></tr></table></translation> </message>
--- a/RadonMetrics/i18n/radon_ru.ts Wed Jan 01 11:58:55 2020 +0100 +++ b/RadonMetrics/i18n/radon_ru.ts Tue Jun 23 19:05:15 2020 +0200 @@ -55,22 +55,22 @@ <translation>%v из %m файлов</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="85"/> + <location filename="../CyclomaticComplexityDialog.py" line="78"/> <source><table><tr><td colspan=3><b>Ranking:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(low risk - simple block)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(low risk - well structured and stable block)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(moderate risk - slightly complex block)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(more than moderate risk - more complex block)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(high risk - complex block, alarming)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(very high risk - error-prone, unstable block)</td></tr></table></source> <translation><table><tr><td colspan=3><b>Ранжирование:</b></td></tr><tr><td><b>A</b></td><td>1 - 5</td><td>(низкий риск - простой блок)</td></tr><tr><td><b>B</b></td><td>6 - 10</td><td>(низкий риск - хорошо структурированный стабильный блок)</td></tr><tr><td><b>C</b></td><td>11 - 20</td><td>(умеренный риск - немного сложный блок)</td></tr><tr><td><b>D</b></td><td>21 - 30</td><td>(более чем умеренный риск - более сложный блок)</td></tr><tr><td><b>E</b></td><td>31 - 40</td><td>(высокий риск - сложный, аварийный блок)</td></tr><tr><td><b>F</b></td><td>&gt; 40</td><td>(очень высокий риск - нестабильный блок, подвержен ошибкам)</td></tr></table></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="102"/> + <location filename="../CyclomaticComplexityDialog.py" line="95"/> <source><table><tr><td colspan=2><b>Type:</b></td></tr><tr><td><b>C</b></td><td>Class</td></tr><tr><td><b>F</b></td><td>Function</td></tr><tr><td><b>M</b></td><td>Method</td></tr></table></source> <translation><table><tr><td colspan=2><b>Тип:</b></td></tr><tr><td><b>C</b></td><td>Класс</td></tr><tr><td><b>F</b></td><td>Функция</td></tr><tr><td><b>M</b></td><td>Метод</td></tr></table></translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="206"/> + <location filename="../CyclomaticComplexityDialog.py" line="199"/> <source>Errors</source> <translation>Ошибки</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="367"/> + <location filename="../CyclomaticComplexityDialog.py" line="360"/> <source>Preparing files...</source> <translation>Подготовка файлов...</translation> </message> @@ -90,12 +90,12 @@ <translation>Отображение процесса выполнения оценки</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="131"/> + <location filename="../CyclomaticComplexityDialog.py" line="124"/> <source>Collapse all</source> <translation>Свернуть все</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="133"/> + <location filename="../CyclomaticComplexityDialog.py" line="126"/> <source>Expand all</source> <translation>Развернуть все</translation> </message> @@ -110,7 +110,7 @@ <translation>Выбор минимального уровня сложности для отображения</translation> </message> <message> - <location filename="../CyclomaticComplexityDialog.py" line="497"/> + <location filename="../CyclomaticComplexityDialog.py" line="490"/> <source><b>Summary:</b><br/>{0} blocks (classes, functions, methods) analyzed.<br/>Average complexity: {7} ({8})<table><tr><td width=30><b>A</b></td><td align='right'>{1} blocks</td></tr><tr><td width=30><b>B</b></td><td align='right'>{2} blocks</td></tr><tr><td width=30><b>C</b></td><td align='right'>{3} blocks</td></tr><tr><td width=30><b>D</b></td><td align='right'>{4} blocks</td></tr><tr><td width=30><b>E</b></td><td align='right'>{5} blocks</td></tr><tr><td width=30><b>F</b></td><td align='right'>{6} blocks</td></tr></table></source> <translation><b>Сводка:</b><br/>{0} блоков (классов, функций, методов) проанализировано.<br/>Средняя сложность: {7} ({8})<table><tr><td width=30><b>A</b></td><td align='right'>{1} блоков</td></tr><tr><td width=30><b>B</b></td><td align='right'>{2} блоков</td></tr><tr><td width=30><b>C</b></td><td align='right'>{3} блоков</td></tr><tr><td width=30><b>D</b></td><td align='right'>{4} блоков</td></tr><tr><td width=30><b>E</b></td><td align='right'>{5} блоков</td></tr><tr><td width=30><b>F</b></td><td align='right'>{6} блоков</td></tr></table></translation> </message> @@ -158,12 +158,12 @@ <translation>%v из %m файлов</translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="131"/> + <location filename="../MaintainabilityIndexDialog.py" line="124"/> <source>Errors</source> <translation>Ошибки</translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="275"/> + <location filename="../MaintainabilityIndexDialog.py" line="268"/> <source>Preparing files...</source> <translation>Подготовка файлов...</translation> </message> @@ -185,12 +185,12 @@ <p>Данный диалог отображает индекс сложности поддержки и его уровень.</p></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="387"/> + <location filename="../MaintainabilityIndexDialog.py" line="380"/> <source><table><tr><td colspan=2><b>Summary:</b></td></tr><tr><td><b>A</b></td><td align='right'>{0} files</td></tr><tr><td><b>B</b></td><td align='right'>{1} files</td></tr><tr><td><b>C</b></td><td align='right'>{2} files</td></tr></table></source> <translation><table><tr><td colspan=2><b>Сводка:</b></td></tr><tr><td><b>A</b></td><td align='right'>{0} файлов</td></tr><tr><td><b>B</b></td><td align='right'>{1} файлов</td></tr><tr><td><b>C</b></td><td align='right'>{2} файлов</td></tr></table></translation> </message> <message> - <location filename="../MaintainabilityIndexDialog.py" line="73"/> + <location filename="../MaintainabilityIndexDialog.py" line="66"/> <source><table><tr><td><b>Rank</b></td><td><b>MI Score</b></td><td><b>Maintainability</b></td></tr><tr><td><b>A</b></td><td>100 - 20</td><td>very high</td></tr><tr><td><b>B</b></td><td>19 - 10</td><td>medium</td></tr><tr><td><b>C</b></td><td>9 - 0</td><td>extremely low</td></tr></table></source> <translation><table><tr><td><b>Уровень</b></td><td><b>MI оценка</b></td><td><b>Сложность поддержки</b></td></tr><tr><td><b>A</b></td><td>100 - 20</td><td>очень высокая</td></tr><tr><td><b>B</b></td><td>19 - 10</td><td>средняя</td></tr><tr><td><b>C</b></td><td>9 - 0</td><td>крайне низкая</td></tr></table></translation> </message> @@ -198,87 +198,82 @@ <context> <name>RadonMetricsPlugin</name> <message> - <location filename="../../PluginMetricsRadon.py" line="221"/> - <source>Python 2 batch job</source> - <translation>Пакетное задание Python 2</translation> - </message> - <message> - <location filename="../../PluginMetricsRadon.py" line="244"/> + <location filename="../../PluginMetricsRadon.py" line="154"/> <source>Python 3 batch job</source> <translation>Пакетное задание Python 3</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="285"/> + <location filename="../../PluginMetricsRadon.py" line="197"/> <source>Unknown metrics result received ({0}).</source> <translation>Получено ({0}) оценок неизвестной метрики.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1051"/> + <location filename="../../PluginMetricsRadon.py" line="949"/> <source>Radon</source> <translation>Radon</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="741"/> + <location filename="../../PluginMetricsRadon.py" line="633"/> <source>Code Metrics</source> <translation>Метрики кода</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="741"/> + <location filename="../../PluginMetricsRadon.py" line="633"/> <source>Code &Metrics...</source> <translation>&Метрики кода...</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="745"/> + <location filename="../../PluginMetricsRadon.py" line="637"/> <source>Show raw code metrics.</source> <translation>Отображение raw метрики кода.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="747"/> + <location filename="../../PluginMetricsRadon.py" line="639"/> <source><b>Code Metrics...</b><p>This calculates raw code metrics of Python files and shows the amount of lines of code, logical lines of code, source lines of code, comment lines, multi-line strings and blank lines.</p></source> <translation><b>Метрики кода...</b><p>Это вычисление raw-метрик кода файлов Python и и показ количества строк кода, строк ветвления кода, строк исходного кода, строк комментариев, строк многострочного текста и пустых строк.</p></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="758"/> + <location filename="../../PluginMetricsRadon.py" line="650"/> <source>Maintainability Index</source> <translation>Индекс сложности поддержки</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="758"/> + <location filename="../../PluginMetricsRadon.py" line="650"/> <source>Maintainability &Index...</source> <translation>&Индекс поддерживаемости...</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="762"/> + <location filename="../../PluginMetricsRadon.py" line="654"/> <source>Show the maintainability index for Python files.</source> <translation>Отображение индекса сложности поддержки файлов Python.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="764"/> + <location filename="../../PluginMetricsRadon.py" line="656"/> <source><b>Maintainability Index...</b><p>This calculates the maintainability index of Python files and shows it together with a ranking.</p></source> <translation><b>Индекс сложности поддержки кода...</b><p>Вычисляет индекс поддерживаемости файлов Python и показывает его значение и уровень.</p></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="775"/> + <location filename="../../PluginMetricsRadon.py" line="667"/> <source>Cyclomatic Complexity</source> <translation>Цикломатическая сложность</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="775"/> + <location filename="../../PluginMetricsRadon.py" line="667"/> <source>Cyclomatic &Complexity...</source> <translation>Цикломатическая &сложность...</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="779"/> + <location filename="../../PluginMetricsRadon.py" line="671"/> <source>Show the cyclomatic complexity for Python files.</source> <translation>Отображение цикломатической сложности файлов Python.</translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="781"/> + <location filename="../../PluginMetricsRadon.py" line="673"/> <source><b>Cyclomatic Complexity...</b><p>This calculates the cyclomatic complexity of Python files and shows it together with a ranking.</p></source> <translation><b>Цикломатическая сложность...</b><p>Вычисляет цикломатическую сложность файлов Python и показывает ее уровень.</p></translation> </message> <message> - <location filename="../../PluginMetricsRadon.py" line="1051"/> + <location filename="../../PluginMetricsRadon.py" line="949"/> <source><p><b>Radon Version {0}</b></p><p>Radon is a Python tool that computes various metrics from the source code. Radon can compute:<ul><li><b>Raw</b> metrics (these include SLOC, comment lines, blank lines, multi line strings, ...)</li><li><b>Maintainability Index</b> (the one used in Visual Studio)</li><li><b>McCabe's complexity</b>, i.e. cyclomatic complexity</li></ul></p></source> <translation><p><b>Версия Radon {0}</b></p><p>Radon является инструментом Python, позволяющим вычислять различные метрики исходного кода. Radon позволяет оценить:<ul><li><b>Raw</b> метрики (к их числу относятся SLOC, строки коментариев, пустые строки, многострочный текст, ...)</li><li><b>Индекс сложности поддержки (качества кода)</b> (применяется в Visual Studio)</li><li><b>Мак-Кейба сложность</b>, то есть цикломатическая сложность</li></ul></p></translation> </message> @@ -318,17 +313,17 @@ <translation>Имя файла</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="432"/> + <location filename="../RawMetricsDialog.py" line="425"/> <source>LOC</source> <translation>LOC</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="434"/> + <location filename="../RawMetricsDialog.py" line="427"/> <source>SLOC</source> <translation>SLOC</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="436"/> + <location filename="../RawMetricsDialog.py" line="429"/> <source>LLOC</source> <translation>LLOC</translation> </message> @@ -378,17 +373,17 @@ <translation>%v из %m файлов</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="146"/> + <location filename="../RawMetricsDialog.py" line="139"/> <source>Errors</source> <translation>Ошибки</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="288"/> + <location filename="../RawMetricsDialog.py" line="281"/> <source>Preparing files...</source> <translation>Подготовка файлов...</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="430"/> + <location filename="../RawMetricsDialog.py" line="423"/> <source>Files</source> <translation>Файлы</translation> </message> @@ -403,27 +398,27 @@ <translation>Отображение процесса выполнения оценки</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="438"/> + <location filename="../RawMetricsDialog.py" line="431"/> <source>Comment Lines</source> <translation>Comment Lines</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="444"/> + <location filename="../RawMetricsDialog.py" line="437"/> <source>Multiline Strings</source> <translation>Multiline Strings</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="447"/> + <location filename="../RawMetricsDialog.py" line="440"/> <source>Empty Lines</source> <translation>Empty Lines</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="441"/> + <location filename="../RawMetricsDialog.py" line="434"/> <source>Empty Comments</source> <translation>Empty Comments</translation> </message> <message> - <location filename="../RawMetricsDialog.py" line="78"/> + <location filename="../RawMetricsDialog.py" line="71"/> <source><table><tr><td><b>LOC</b></td><td>Lines of code</td></tr><tr><td><b>SLOC</b></td><td>Source lines of code</td></tr><tr><td><b>LLOC</b></td><td>Logical lines of code</td></tr><tr><td><b>Comments</b></td><td>Comment lines</td></tr><tr><td><b>Empty&nbsp;Comments</b></td><td>Comment lines not containing code</td></tr><tr><td><b>Multi</b></td><td>Lines in multi line strings</td></tr><tr><td><b>Empty</b></td><td>Blank lines</td></tr><tr><td colspan=2><b>Comment Statistics:</b></td</tr><tr><td><b>C % L</b></td><td>Comments to lines ratio</td></tr><tr><td><b>C % S</b></td><td>Comments to source lines ratio</td></tr><tr><td><b>C + M % L</b></td><td>Comments plus multi line strings to lines ratio</td></tr></table></source> <translation><table><tr><td><b>LOC</b></td><td>Количество строк кода</td></tr><tr><td><b>SLOC</b></td><td>Количество исходных строк кода</td></tr><tr><td><b>LLOC</b></td><td>Количество логических строк кода</td></tr><tr><td><b>Comments</b></td><td>Количество строк комментариев</td></tr><tr><td><b>Empty&nbsp;Comments</b></td><td>Количество строк комментариев не содержащих код</td></tr><tr><td><b>Multi</b></td><td>Количество строк многострочного текста</td></tr><tr><td><b>Empty</b></td><td>Количество пустых строк</td></tr><tr><td colspan=2><b>Статистика коментариев::</b></td</tr><tr><td><b>C % L</b></td><td>Процент строк комментариев к общему числу строк</td></tr><tr><td><b>C % S</b></td><td>Процент строк комментариев к числу строк исходного кода</td></tr><tr><td><b>C + M % L</b></td><td>Процент строк комментариев + многострочного текста к общему числу строк</td></tr></table></translation> </message>