eric6/Plugins/CheckerPlugins/CodeStyleChecker/MiscellaneousChecker.py

changeset 7057
0e8d3b0c4889
parent 7045
c2bf08f87a1d
child 7245
b47179fbb9d8
equal deleted inserted replaced
7056:516361cdd2d2 7057:0e8d3b0c4889
758 pass 758 pass
759 759
760 for node in ast.walk(self.__tree): 760 for node in ast.walk(self.__tree):
761 if any(isinstance(node, functionDef) 761 if any(isinstance(node, functionDef)
762 for functionDef in functionDefs): 762 for functionDef in functionDefs):
763 for default in node.args.defaults + node.args.kw_defaults: 763 defaults = node.args.defaults[:]
764 try:
765 defaults += node.args.kw_defaults[:]
766 except AttributeError:
767 pass
768 for default in defaults:
764 if any(isinstance(default, mutableType) 769 if any(isinstance(default, mutableType)
765 for mutableType in mutableTypes): 770 for mutableType in mutableTypes):
766 typeName = type(default).__name__ 771 typeName = type(default).__name__
767 if isinstance(default, ast.Call): 772 if isinstance(default, ast.Call):
768 callPath = '.'.join(composeCallPath(default.func)) 773 callPath = '.'.join(composeCallPath(default.func))

eric ide

mercurial