Wed, 07 Oct 2015 19:21:32 +0200
Fixed some code style issues.
--- a/PluginCheckerVulture.e4p Wed Oct 07 19:17:49 2015 +0200 +++ b/PluginCheckerVulture.e4p Wed Oct 07 19:21:32 2015 +0200 @@ -152,4 +152,89 @@ <FiletypeAssociation pattern="*.ui" type="FORMS"/> <FiletypeAssociation pattern="Ui_*.py" type="__IGNORE__"/> </FiletypeAssociations> + <Checkers> + <CheckersParams> + <dict> + <key> + <string>Pep8Checker</string> + </key> + <value> + <dict> + <key> + <string>DocstringType</string> + </key> + <value> + <string>eric</string> + </value> + <key> + <string>ExcludeFiles</string> + </key> + <value> + <string>*/Ui_*.py, */vulture.py</string> + </value> + <key> + <string>ExcludeMessages</string> + </key> + <value> + <string>E265, N802, N803, N807, N808, N821, W293, C101</string> + </value> + <key> + <string>FixCodes</string> + </key> + <value> + <string></string> + </value> + <key> + <string>FixIssues</string> + </key> + <value> + <bool>False</bool> + </value> + <key> + <string>HangClosing</string> + </key> + <value> + <bool>False</bool> + </value> + <key> + <string>IncludeMessages</string> + </key> + <value> + <string></string> + </value> + <key> + <string>MaxCodeComplexity</string> + </key> + <value> + <int>10</int> + </value> + <key> + <string>MaxLineLength</string> + </key> + <value> + <int>79</int> + </value> + <key> + <string>NoFixCodes</string> + </key> + <value> + <string>E501</string> + </value> + <key> + <string>RepeatMessages</string> + </key> + <value> + <bool>True</bool> + </value> + <key> + <string>ShowIgnored</string> + </key> + <value> + <bool>False</bool> + </value> + </dict> + </value> + </dict> + </CheckersParams> + </Checkers> </Project>
--- a/VultureChecker/EditWhiteListDialog.py Wed Oct 07 19:17:49 2015 +0200 +++ b/VultureChecker/EditWhiteListDialog.py Wed Oct 07 19:21:32 2015 +0200 @@ -32,13 +32,13 @@ self.setupUi(self) self.__lists = [ - self.classesList, - self.functionsList, - self.slotsList, - self.attributesList, - self.variablesList, - self.propertiesList, - self.patternsList, + self.classesList, + self.functionsList, + self.slotsList, + self.attributesList, + self.variablesList, + self.propertiesList, + self.patternsList, ] self.classesList.addItems(whitelists["class"])
--- a/VultureChecker/VultureCheckerDialog.py Wed Oct 07 19:17:49 2015 +0200 +++ b/VultureChecker/VultureCheckerDialog.py Wed Oct 07 19:21:32 2015 +0200 @@ -533,7 +533,7 @@ """ return self.__getUnusedItems( self.__definedFuncs, - self.__usedAttrs + self.__usedVars + + self.__usedAttrs + self.__usedVars + self.__namesImportedAsAliases + self.__data["WhiteLists"]["function"] + self.__data["WhiteLists"]["class"]) @@ -547,7 +547,7 @@ """ return self.__getUnusedItems( self.__definedSlots, - self.__usedAttrs + self.__usedVars + + self.__usedAttrs + self.__usedVars + self.__namesImportedAsAliases + self.__data["WhiteLists"]["slot"]) @@ -633,6 +633,8 @@ @param filename file name for the item @type str + @return reference to the created item + @rtype QTreeWidgetItem """ itm = QTreeWidgetItem(self.resultList, [ self.__project.getRelativePath(filename)])
--- a/VultureChecker/VultureCheckerService.py Wed Oct 07 19:17:49 2015 +0200 +++ b/VultureChecker/VultureCheckerService.py Wed Oct 07 19:21:32 2015 +0200 @@ -130,7 +130,6 @@ @return tuple containing the result dictionary @rtype (tuple of dict) """ - # Check type for py2: if not str it's unicode if sys.version_info[0] == 2: try: @@ -187,7 +186,7 @@ "name": str(item), "type": getattr(item, "typ", ""), "file": getattr(item, "file", ""), - "line": getattr(item, "lineno", ""), + "line": getattr(item, "lineno", ""), } return d @@ -199,22 +198,22 @@ @rtype dict """ return { - "DefinedAttributes": + "DefinedAttributes": [self.__item2Dict(i) for i in self.defined_attrs], - "DefinedFunctions": + "DefinedFunctions": [self.__item2Dict(i) for i in self.defined_funcs], - "DefinedSlots": + "DefinedSlots": [self.__item2Dict(i) for i in self.defined_slots], - "DefinedProperties": + "DefinedProperties": [self.__item2Dict(i) for i in self.defined_props], - "DefinedVariables": + "DefinedVariables": [self.__item2Dict(i) for i in self.defined_vars], - "UsedAttributes": + "UsedAttributes": [self.__item2Dict(i) for i in self.used_attrs], - "UsedVariables": + "UsedVariables": [self.__item2Dict(i) for i in self.used_vars], - "TupleVariables": + "TupleVariables": [self.__item2Dict(i) for i in self.tuple_assign_vars], - "Aliases": + "Aliases": [self.__item2Dict(i) for i in self.names_imported_as_aliases], }