Wed, 15 Jan 2014 19:16:06 +0100
Renamed Utilities.py3flakes to Utilities.pyflakes to prepare the upgrade to the latest pyflakes version (supporting both Python variants).
--- a/Documentation/Help/source.qhp Wed Jan 15 19:05:51 2014 +0100 +++ b/Documentation/Help/source.qhp Wed Jan 15 19:16:06 2014 +0100 @@ -953,10 +953,10 @@ <section title="eric5.Utilities.crypto.py3AES" ref="eric5.Utilities.crypto.py3AES.html" /> <section title="eric5.Utilities.crypto.py3PBKDF2" ref="eric5.Utilities.crypto.py3PBKDF2.html" /> </section> - <section title="eric5.Utilities.py3flakes" ref="index-eric5.Utilities.py3flakes.html"> - <section title="eric5.Utilities.py3flakes.checker" ref="eric5.Utilities.py3flakes.checker.html" /> - <section title="eric5.Utilities.py3flakes.messages" ref="eric5.Utilities.py3flakes.messages.html" /> - <section title="eric5.Utilities.py3flakes.translations" ref="eric5.Utilities.py3flakes.translations.html" /> + <section title="eric5.Utilities.pyflakes" ref="index-eric5.Utilities.pyflakes.html"> + <section title="eric5.Utilities.pyflakes.checker" ref="eric5.Utilities.pyflakes.checker.html" /> + <section title="eric5.Utilities.pyflakes.messages" ref="eric5.Utilities.pyflakes.messages.html" /> + <section title="eric5.Utilities.pyflakes.translations" ref="eric5.Utilities.pyflakes.translations.html" /> </section> <section title="eric5.Utilities.AutoSaver" ref="eric5.Utilities.AutoSaver.html" /> <section title="eric5.Utilities.FtpUtilities" ref="eric5.Utilities.FtpUtilities.html" /> @@ -1339,7 +1339,7 @@ <keyword name="ApplicationPage (Constructor)" id="ApplicationPage (Constructor)" ref="eric5.Preferences.ConfigurationPages.ApplicationPage.html#ApplicationPage.__init__" /> <keyword name="ApplicationPage (Module)" id="ApplicationPage (Module)" ref="eric5.Preferences.ConfigurationPages.ApplicationPage.html" /> <keyword name="ApplicationPage.save" id="ApplicationPage.save" ref="eric5.Preferences.ConfigurationPages.ApplicationPage.html#ApplicationPage.save" /> - <keyword name="Argument" id="Argument" ref="eric5.Utilities.py3flakes.checker.html#Argument" /> + <keyword name="Argument" id="Argument" ref="eric5.Utilities.pyflakes.checker.html#Argument" /> <keyword name="Argument" id="Argument" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Argument" /> <keyword name="ArgumentsError" id="ArgumentsError" ref="eric5.E5Gui.E5Action.html#ArgumentsError" /> <keyword name="ArgumentsError (Constructor)" id="ArgumentsError (Constructor)" ref="eric5.E5Gui.E5Action.html#ArgumentsError.__init__" /> @@ -1348,7 +1348,7 @@ <keyword name="ArrayElementVarItem" id="ArrayElementVarItem" ref="eric5.Debugger.VariablesViewer.html#ArrayElementVarItem" /> <keyword name="ArrayElementVarItem (Constructor)" id="ArrayElementVarItem (Constructor)" ref="eric5.Debugger.VariablesViewer.html#ArrayElementVarItem.__init__" /> <keyword name="ArrayElementVarItem.key" id="ArrayElementVarItem.key" ref="eric5.Debugger.VariablesViewer.html#ArrayElementVarItem.key" /> - <keyword name="Assignment" id="Assignment" ref="eric5.Utilities.py3flakes.checker.html#Assignment" /> + <keyword name="Assignment" id="Assignment" ref="eric5.Utilities.pyflakes.checker.html#Assignment" /> <keyword name="Assignment" id="Assignment" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Assignment" /> <keyword name="AssociationItem" id="AssociationItem" ref="eric5.Graphics.AssociationItem.html#AssociationItem" /> <keyword name="AssociationItem (Constructor)" id="AssociationItem (Constructor)" ref="eric5.Graphics.AssociationItem.html#AssociationItem.__init__" /> @@ -1504,13 +1504,13 @@ <keyword name="BinaryModel.setBitsAndValue" id="BinaryModel.setBitsAndValue" ref="eric5.UI.NumbersWidget.html#BinaryModel.setBitsAndValue" /> <keyword name="BinaryModel.setData" id="BinaryModel.setData" ref="eric5.UI.NumbersWidget.html#BinaryModel.setData" /> <keyword name="BinaryModel.setValue" id="BinaryModel.setValue" ref="eric5.UI.NumbersWidget.html#BinaryModel.setValue" /> - <keyword name="Binding" id="Binding" ref="eric5.Utilities.py3flakes.checker.html#Binding" /> + <keyword name="Binding" id="Binding" ref="eric5.Utilities.pyflakes.checker.html#Binding" /> <keyword name="Binding" id="Binding" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Binding" /> - <keyword name="Binding (Constructor)" id="Binding (Constructor)" ref="eric5.Utilities.py3flakes.checker.html#Binding.__init__" /> + <keyword name="Binding (Constructor)" id="Binding (Constructor)" ref="eric5.Utilities.pyflakes.checker.html#Binding.__init__" /> <keyword name="Binding (Constructor)" id="Binding (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Binding.__init__" /> - <keyword name="Binding.__repr__" id="Binding.__repr__" ref="eric5.Utilities.py3flakes.checker.html#Binding.__repr__" /> + <keyword name="Binding.__repr__" id="Binding.__repr__" ref="eric5.Utilities.pyflakes.checker.html#Binding.__repr__" /> <keyword name="Binding.__repr__" id="Binding.__repr__" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Binding.__repr__" /> - <keyword name="Binding.__str__" id="Binding.__str__" ref="eric5.Utilities.py3flakes.checker.html#Binding.__str__" /> + <keyword name="Binding.__str__" id="Binding.__str__" ref="eric5.Utilities.pyflakes.checker.html#Binding.__str__" /> <keyword name="Binding.__str__" id="Binding.__str__" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Binding.__str__" /> <keyword name="BookmarkActionSelectionDialog" id="BookmarkActionSelectionDialog" ref="eric5.Helpviewer.UrlBar.BookmarkActionSelectionDialog.html#BookmarkActionSelectionDialog" /> <keyword name="BookmarkActionSelectionDialog (Constructor)" id="BookmarkActionSelectionDialog (Constructor)" ref="eric5.Helpviewer.UrlBar.BookmarkActionSelectionDialog.html#BookmarkActionSelectionDialog.__init__" /> @@ -1976,96 +1976,96 @@ <keyword name="ChatWidget.preferencesChanged" id="ChatWidget.preferencesChanged" ref="eric5.Cooperation.ChatWidget.html#ChatWidget.preferencesChanged" /> <keyword name="ChatWidget.shutdown" id="ChatWidget.shutdown" ref="eric5.Cooperation.ChatWidget.html#ChatWidget.shutdown" /> <keyword name="Checker" id="Checker" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#Checker" /> - <keyword name="Checker" id="Checker" ref="eric5.Utilities.py3flakes.checker.html#Checker" /> + <keyword name="Checker" id="Checker" ref="eric5.Utilities.pyflakes.checker.html#Checker" /> <keyword name="Checker" id="Checker" ref="eric5.UtilitiesPython2.pep8.html#Checker" /> <keyword name="Checker" id="Checker" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker" /> <keyword name="Checker (Constructor)" id="Checker (Constructor)" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#Checker.__init__" /> - <keyword name="Checker (Constructor)" id="Checker (Constructor)" ref="eric5.Utilities.py3flakes.checker.html#Checker.__init__" /> + <keyword name="Checker (Constructor)" id="Checker (Constructor)" ref="eric5.Utilities.pyflakes.checker.html#Checker.__init__" /> <keyword name="Checker (Constructor)" id="Checker (Constructor)" ref="eric5.UtilitiesPython2.pep8.html#Checker.__init__" /> <keyword name="Checker (Constructor)" id="Checker (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.__init__" /> - <keyword name="Checker.ASSIGN" id="Checker.ASSIGN" ref="eric5.Utilities.py3flakes.checker.html#Checker.ASSIGN" /> + <keyword name="Checker.ASSIGN" id="Checker.ASSIGN" ref="eric5.Utilities.pyflakes.checker.html#Checker.ASSIGN" /> <keyword name="Checker.ASSIGN" id="Checker.ASSIGN" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.ASSIGN" /> - <keyword name="Checker.AUGASSIGN" id="Checker.AUGASSIGN" ref="eric5.Utilities.py3flakes.checker.html#Checker.AUGASSIGN" /> + <keyword name="Checker.AUGASSIGN" id="Checker.AUGASSIGN" ref="eric5.Utilities.pyflakes.checker.html#Checker.AUGASSIGN" /> <keyword name="Checker.AUGASSIGN" id="Checker.AUGASSIGN" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.AUGASSIGN" /> - <keyword name="Checker.CLASSDEF" id="Checker.CLASSDEF" ref="eric5.Utilities.py3flakes.checker.html#Checker.CLASSDEF" /> + <keyword name="Checker.CLASSDEF" id="Checker.CLASSDEF" ref="eric5.Utilities.pyflakes.checker.html#Checker.CLASSDEF" /> <keyword name="Checker.CLASSDEF" id="Checker.CLASSDEF" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.CLASSDEF" /> - <keyword name="Checker.DICTCOMP" id="Checker.DICTCOMP" ref="eric5.Utilities.py3flakes.checker.html#Checker.DICTCOMP" /> + <keyword name="Checker.DICTCOMP" id="Checker.DICTCOMP" ref="eric5.Utilities.pyflakes.checker.html#Checker.DICTCOMP" /> <keyword name="Checker.DICTCOMP" id="Checker.DICTCOMP" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.DICTCOMP" /> - <keyword name="Checker.EXCEPTHANDLER" id="Checker.EXCEPTHANDLER" ref="eric5.Utilities.py3flakes.checker.html#Checker.EXCEPTHANDLER" /> - <keyword name="Checker.FOR" id="Checker.FOR" ref="eric5.Utilities.py3flakes.checker.html#Checker.FOR" /> + <keyword name="Checker.EXCEPTHANDLER" id="Checker.EXCEPTHANDLER" ref="eric5.Utilities.pyflakes.checker.html#Checker.EXCEPTHANDLER" /> + <keyword name="Checker.FOR" id="Checker.FOR" ref="eric5.Utilities.pyflakes.checker.html#Checker.FOR" /> <keyword name="Checker.FOR" id="Checker.FOR" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.FOR" /> - <keyword name="Checker.FUNCTIONDEF" id="Checker.FUNCTIONDEF" ref="eric5.Utilities.py3flakes.checker.html#Checker.FUNCTIONDEF" /> + <keyword name="Checker.FUNCTIONDEF" id="Checker.FUNCTIONDEF" ref="eric5.Utilities.pyflakes.checker.html#Checker.FUNCTIONDEF" /> <keyword name="Checker.FUNCTIONDEF" id="Checker.FUNCTIONDEF" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.FUNCTIONDEF" /> - <keyword name="Checker.GLOBAL" id="Checker.GLOBAL" ref="eric5.Utilities.py3flakes.checker.html#Checker.GLOBAL" /> + <keyword name="Checker.GLOBAL" id="Checker.GLOBAL" ref="eric5.Utilities.pyflakes.checker.html#Checker.GLOBAL" /> <keyword name="Checker.GLOBAL" id="Checker.GLOBAL" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.GLOBAL" /> - <keyword name="Checker.IMPORT" id="Checker.IMPORT" ref="eric5.Utilities.py3flakes.checker.html#Checker.IMPORT" /> + <keyword name="Checker.IMPORT" id="Checker.IMPORT" ref="eric5.Utilities.pyflakes.checker.html#Checker.IMPORT" /> <keyword name="Checker.IMPORT" id="Checker.IMPORT" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.IMPORT" /> - <keyword name="Checker.IMPORTFROM" id="Checker.IMPORTFROM" ref="eric5.Utilities.py3flakes.checker.html#Checker.IMPORTFROM" /> + <keyword name="Checker.IMPORTFROM" id="Checker.IMPORTFROM" ref="eric5.Utilities.pyflakes.checker.html#Checker.IMPORTFROM" /> <keyword name="Checker.IMPORTFROM" id="Checker.IMPORTFROM" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.IMPORTFROM" /> - <keyword name="Checker.LAMBDA" id="Checker.LAMBDA" ref="eric5.Utilities.py3flakes.checker.html#Checker.LAMBDA" /> + <keyword name="Checker.LAMBDA" id="Checker.LAMBDA" ref="eric5.Utilities.pyflakes.checker.html#Checker.LAMBDA" /> <keyword name="Checker.LAMBDA" id="Checker.LAMBDA" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.LAMBDA" /> - <keyword name="Checker.LISTCOMP" id="Checker.LISTCOMP" ref="eric5.Utilities.py3flakes.checker.html#Checker.LISTCOMP" /> + <keyword name="Checker.LISTCOMP" id="Checker.LISTCOMP" ref="eric5.Utilities.pyflakes.checker.html#Checker.LISTCOMP" /> <keyword name="Checker.LISTCOMP" id="Checker.LISTCOMP" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.LISTCOMP" /> - <keyword name="Checker.NAME" id="Checker.NAME" ref="eric5.Utilities.py3flakes.checker.html#Checker.NAME" /> + <keyword name="Checker.NAME" id="Checker.NAME" ref="eric5.Utilities.pyflakes.checker.html#Checker.NAME" /> <keyword name="Checker.NAME" id="Checker.NAME" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.NAME" /> - <keyword name="Checker.STARRED" id="Checker.STARRED" ref="eric5.Utilities.py3flakes.checker.html#Checker.STARRED" /> - <keyword name="Checker._runDeferred" id="Checker._runDeferred" ref="eric5.Utilities.py3flakes.checker.html#Checker._runDeferred" /> + <keyword name="Checker.STARRED" id="Checker.STARRED" ref="eric5.Utilities.pyflakes.checker.html#Checker.STARRED" /> + <keyword name="Checker._runDeferred" id="Checker._runDeferred" ref="eric5.Utilities.pyflakes.checker.html#Checker._runDeferred" /> <keyword name="Checker._runDeferred" id="Checker._runDeferred" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker._runDeferred" /> - <keyword name="Checker.addArgs" id="Checker.addArgs" ref="eric5.Utilities.py3flakes.checker.html#Checker.addArgs" /> + <keyword name="Checker.addArgs" id="Checker.addArgs" ref="eric5.Utilities.pyflakes.checker.html#Checker.addArgs" /> <keyword name="Checker.addArgs" id="Checker.addArgs" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.addArgs" /> - <keyword name="Checker.addBinding" id="Checker.addBinding" ref="eric5.Utilities.py3flakes.checker.html#Checker.addBinding" /> + <keyword name="Checker.addBinding" id="Checker.addBinding" ref="eric5.Utilities.pyflakes.checker.html#Checker.addBinding" /> <keyword name="Checker.addBinding" id="Checker.addBinding" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.addBinding" /> <keyword name="Checker.build_tokens_line" id="Checker.build_tokens_line" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#Checker.build_tokens_line" /> <keyword name="Checker.build_tokens_line" id="Checker.build_tokens_line" ref="eric5.UtilitiesPython2.pep8.html#Checker.build_tokens_line" /> - <keyword name="Checker.checkUnusedAssignments" id="Checker.checkUnusedAssignments" ref="eric5.Utilities.py3flakes.checker.html#Checker.checkUnusedAssignments" /> + <keyword name="Checker.checkUnusedAssignments" id="Checker.checkUnusedAssignments" ref="eric5.Utilities.pyflakes.checker.html#Checker.checkUnusedAssignments" /> <keyword name="Checker.checkUnusedAssignments" id="Checker.checkUnusedAssignments" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.checkUnusedAssignments" /> <keyword name="Checker.check_all" id="Checker.check_all" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#Checker.check_all" /> <keyword name="Checker.check_all" id="Checker.check_all" ref="eric5.UtilitiesPython2.pep8.html#Checker.check_all" /> <keyword name="Checker.check_ast" id="Checker.check_ast" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#Checker.check_ast" /> <keyword name="Checker.check_ast" id="Checker.check_ast" ref="eric5.UtilitiesPython2.pep8.html#Checker.check_ast" /> - <keyword name="Checker.check_dead_scopes" id="Checker.check_dead_scopes" ref="eric5.Utilities.py3flakes.checker.html#Checker.check_dead_scopes" /> + <keyword name="Checker.check_dead_scopes" id="Checker.check_dead_scopes" ref="eric5.Utilities.pyflakes.checker.html#Checker.check_dead_scopes" /> <keyword name="Checker.check_dead_scopes" id="Checker.check_dead_scopes" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.check_dead_scopes" /> <keyword name="Checker.check_logical" id="Checker.check_logical" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#Checker.check_logical" /> <keyword name="Checker.check_logical" id="Checker.check_logical" ref="eric5.UtilitiesPython2.pep8.html#Checker.check_logical" /> <keyword name="Checker.check_physical" id="Checker.check_physical" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#Checker.check_physical" /> <keyword name="Checker.check_physical" id="Checker.check_physical" ref="eric5.UtilitiesPython2.pep8.html#Checker.check_physical" /> - <keyword name="Checker.collectLoopVars" id="Checker.collectLoopVars" ref="eric5.Utilities.py3flakes.checker.html#Checker.collectLoopVars" /> + <keyword name="Checker.collectLoopVars" id="Checker.collectLoopVars" ref="eric5.Utilities.pyflakes.checker.html#Checker.collectLoopVars" /> <keyword name="Checker.collectLoopVars" id="Checker.collectLoopVars" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.collectLoopVars" /> - <keyword name="Checker.deferAssignment" id="Checker.deferAssignment" ref="eric5.Utilities.py3flakes.checker.html#Checker.deferAssignment" /> + <keyword name="Checker.deferAssignment" id="Checker.deferAssignment" ref="eric5.Utilities.pyflakes.checker.html#Checker.deferAssignment" /> <keyword name="Checker.deferAssignment" id="Checker.deferAssignment" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.deferAssignment" /> - <keyword name="Checker.deferFunction" id="Checker.deferFunction" ref="eric5.Utilities.py3flakes.checker.html#Checker.deferFunction" /> + <keyword name="Checker.deferFunction" id="Checker.deferFunction" ref="eric5.Utilities.pyflakes.checker.html#Checker.deferFunction" /> <keyword name="Checker.deferFunction" id="Checker.deferFunction" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.deferFunction" /> <keyword name="Checker.generate_tokens" id="Checker.generate_tokens" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#Checker.generate_tokens" /> <keyword name="Checker.generate_tokens" id="Checker.generate_tokens" ref="eric5.UtilitiesPython2.pep8.html#Checker.generate_tokens" /> - <keyword name="Checker.handleAssignName" id="Checker.handleAssignName" ref="eric5.Utilities.py3flakes.checker.html#Checker.handleAssignName" /> - <keyword name="Checker.handleBody" id="Checker.handleBody" ref="eric5.Utilities.py3flakes.checker.html#Checker.handleBody" /> - <keyword name="Checker.handleChildren" id="Checker.handleChildren" ref="eric5.Utilities.py3flakes.checker.html#Checker.handleChildren" /> + <keyword name="Checker.handleAssignName" id="Checker.handleAssignName" ref="eric5.Utilities.pyflakes.checker.html#Checker.handleAssignName" /> + <keyword name="Checker.handleBody" id="Checker.handleBody" ref="eric5.Utilities.pyflakes.checker.html#Checker.handleBody" /> + <keyword name="Checker.handleChildren" id="Checker.handleChildren" ref="eric5.Utilities.pyflakes.checker.html#Checker.handleChildren" /> <keyword name="Checker.handleChildren" id="Checker.handleChildren" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.handleChildren" /> - <keyword name="Checker.handleNode" id="Checker.handleNode" ref="eric5.Utilities.py3flakes.checker.html#Checker.handleNode" /> + <keyword name="Checker.handleNode" id="Checker.handleNode" ref="eric5.Utilities.pyflakes.checker.html#Checker.handleNode" /> <keyword name="Checker.handleNode" id="Checker.handleNode" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.handleNode" /> - <keyword name="Checker.ignore" id="Checker.ignore" ref="eric5.Utilities.py3flakes.checker.html#Checker.ignore" /> + <keyword name="Checker.ignore" id="Checker.ignore" ref="eric5.Utilities.pyflakes.checker.html#Checker.ignore" /> <keyword name="Checker.ignore" id="Checker.ignore" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.ignore" /> - <keyword name="Checker.isDocstring" id="Checker.isDocstring" ref="eric5.Utilities.py3flakes.checker.html#Checker.isDocstring" /> + <keyword name="Checker.isDocstring" id="Checker.isDocstring" ref="eric5.Utilities.pyflakes.checker.html#Checker.isDocstring" /> <keyword name="Checker.isDocstring" id="Checker.isDocstring" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.isDocstring" /> - <keyword name="Checker.popScope" id="Checker.popScope" ref="eric5.Utilities.py3flakes.checker.html#Checker.popScope" /> + <keyword name="Checker.popScope" id="Checker.popScope" ref="eric5.Utilities.pyflakes.checker.html#Checker.popScope" /> <keyword name="Checker.popScope" id="Checker.popScope" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.popScope" /> - <keyword name="Checker.pushClassScope" id="Checker.pushClassScope" ref="eric5.Utilities.py3flakes.checker.html#Checker.pushClassScope" /> + <keyword name="Checker.pushClassScope" id="Checker.pushClassScope" ref="eric5.Utilities.pyflakes.checker.html#Checker.pushClassScope" /> <keyword name="Checker.pushClassScope" id="Checker.pushClassScope" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.pushClassScope" /> - <keyword name="Checker.pushFunctionScope" id="Checker.pushFunctionScope" ref="eric5.Utilities.py3flakes.checker.html#Checker.pushFunctionScope" /> + <keyword name="Checker.pushFunctionScope" id="Checker.pushFunctionScope" ref="eric5.Utilities.pyflakes.checker.html#Checker.pushFunctionScope" /> <keyword name="Checker.pushFunctionScope" id="Checker.pushFunctionScope" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.pushFunctionScope" /> <keyword name="Checker.readline" id="Checker.readline" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#Checker.readline" /> <keyword name="Checker.readline" id="Checker.readline" ref="eric5.UtilitiesPython2.pep8.html#Checker.readline" /> <keyword name="Checker.readline_check_physical" id="Checker.readline_check_physical" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#Checker.readline_check_physical" /> <keyword name="Checker.readline_check_physical" id="Checker.readline_check_physical" ref="eric5.UtilitiesPython2.pep8.html#Checker.readline_check_physical" /> - <keyword name="Checker.report" id="Checker.report" ref="eric5.Utilities.py3flakes.checker.html#Checker.report" /> + <keyword name="Checker.report" id="Checker.report" ref="eric5.Utilities.pyflakes.checker.html#Checker.report" /> <keyword name="Checker.report" id="Checker.report" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.report" /> <keyword name="Checker.report_invalid_syntax" id="Checker.report_invalid_syntax" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#Checker.report_invalid_syntax" /> <keyword name="Checker.report_invalid_syntax" id="Checker.report_invalid_syntax" ref="eric5.UtilitiesPython2.pep8.html#Checker.report_invalid_syntax" /> - <keyword name="Checker.runFunction" id="Checker.runFunction" ref="eric5.Utilities.py3flakes.checker.html#Checker.runFunction" /> + <keyword name="Checker.runFunction" id="Checker.runFunction" ref="eric5.Utilities.pyflakes.checker.html#Checker.runFunction" /> <keyword name="Checker.runFunction" id="Checker.runFunction" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.runFunction" /> <keyword name="Checker.run_check" id="Checker.run_check" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#Checker.run_check" /> <keyword name="Checker.run_check" id="Checker.run_check" ref="eric5.UtilitiesPython2.pep8.html#Checker.run_check" /> - <keyword name="Checker.scope" id="Checker.scope" ref="eric5.Utilities.py3flakes.checker.html#Checker.scope" /> + <keyword name="Checker.scope" id="Checker.scope" ref="eric5.Utilities.pyflakes.checker.html#Checker.scope" /> <keyword name="Checker.scope" id="Checker.scope" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Checker.scope" /> <keyword name="CheckerPlugins (Package)" id="CheckerPlugins (Package)" ref="index-eric5.Plugins.CheckerPlugins.html" /> <keyword name="ChromeImporter" id="ChromeImporter" ref="eric5.Helpviewer.Bookmarks.BookmarksImporters.ChromeImporter.html#ChromeImporter" /> @@ -2109,7 +2109,7 @@ <keyword name="ClassModel.addMethod" id="ClassModel.addMethod" ref="eric5.Graphics.ClassItem.html#ClassModel.addMethod" /> <keyword name="ClassModel.getAttributes" id="ClassModel.getAttributes" ref="eric5.Graphics.ClassItem.html#ClassModel.getAttributes" /> <keyword name="ClassModel.getMethods" id="ClassModel.getMethods" ref="eric5.Graphics.ClassItem.html#ClassModel.getMethods" /> - <keyword name="ClassScope" id="ClassScope" ref="eric5.Utilities.py3flakes.checker.html#ClassScope" /> + <keyword name="ClassScope" id="ClassScope" ref="eric5.Utilities.pyflakes.checker.html#ClassScope" /> <keyword name="ClassScope" id="ClassScope" ref="eric5.UtilitiesPython2.py2flakes.checker.html#ClassScope" /> <keyword name="ClbrBase" id="ClbrBase" ref="eric5.Utilities.ClassBrowsers.ClbrBaseClasses.html#ClbrBase" /> <keyword name="ClbrBase (Constructor)" id="ClbrBase (Constructor)" ref="eric5.Utilities.ClassBrowsers.ClbrBaseClasses.html#ClbrBase.__init__" /> @@ -3617,9 +3617,9 @@ <keyword name="DownloadModel.removeRows" id="DownloadModel.removeRows" ref="eric5.Helpviewer.Download.DownloadModel.html#DownloadModel.removeRows" /> <keyword name="DownloadModel.rowCount" id="DownloadModel.rowCount" ref="eric5.Helpviewer.Download.DownloadModel.html#DownloadModel.rowCount" /> <keyword name="DownloadUtilities (Module)" id="DownloadUtilities (Module)" ref="eric5.Helpviewer.Download.DownloadUtilities.html" /> - <keyword name="DuplicateArgument" id="DuplicateArgument" ref="eric5.Utilities.py3flakes.messages.html#DuplicateArgument" /> + <keyword name="DuplicateArgument" id="DuplicateArgument" ref="eric5.Utilities.pyflakes.messages.html#DuplicateArgument" /> <keyword name="DuplicateArgument" id="DuplicateArgument" ref="eric5.UtilitiesPython2.py2flakes.messages.html#DuplicateArgument" /> - <keyword name="DuplicateArgument (Constructor)" id="DuplicateArgument (Constructor)" ref="eric5.Utilities.py3flakes.messages.html#DuplicateArgument.__init__" /> + <keyword name="DuplicateArgument (Constructor)" id="DuplicateArgument (Constructor)" ref="eric5.Utilities.pyflakes.messages.html#DuplicateArgument.__init__" /> <keyword name="DuplicateArgument (Constructor)" id="DuplicateArgument (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.messages.html#DuplicateArgument.__init__" /> <keyword name="E5Action" id="E5Action" ref="eric5.E5Gui.E5Action.html#E5Action" /> <keyword name="E5Action (Constructor)" id="E5Action (Constructor)" ref="eric5.E5Gui.E5Action.html#E5Action.__init__" /> @@ -4822,9 +4822,9 @@ <keyword name="ExceptionsFilterDialog.on_deleteButton_clicked" id="ExceptionsFilterDialog.on_deleteButton_clicked" ref="eric5.Debugger.ExceptionsFilterDialog.html#ExceptionsFilterDialog.on_deleteButton_clicked" /> <keyword name="ExceptionsFilterDialog.on_exceptionEdit_textChanged" id="ExceptionsFilterDialog.on_exceptionEdit_textChanged" ref="eric5.Debugger.ExceptionsFilterDialog.html#ExceptionsFilterDialog.on_exceptionEdit_textChanged" /> <keyword name="ExceptionsFilterDialog.on_exceptionList_itemSelectionChanged" id="ExceptionsFilterDialog.on_exceptionList_itemSelectionChanged" ref="eric5.Debugger.ExceptionsFilterDialog.html#ExceptionsFilterDialog.on_exceptionList_itemSelectionChanged" /> - <keyword name="ExportBinding" id="ExportBinding" ref="eric5.Utilities.py3flakes.checker.html#ExportBinding" /> + <keyword name="ExportBinding" id="ExportBinding" ref="eric5.Utilities.pyflakes.checker.html#ExportBinding" /> <keyword name="ExportBinding" id="ExportBinding" ref="eric5.UtilitiesPython2.py2flakes.checker.html#ExportBinding" /> - <keyword name="ExportBinding.names" id="ExportBinding.names" ref="eric5.Utilities.py3flakes.checker.html#ExportBinding.names" /> + <keyword name="ExportBinding.names" id="ExportBinding.names" ref="eric5.Utilities.pyflakes.checker.html#ExportBinding.names" /> <keyword name="ExportBinding.names" id="ExportBinding.names" ref="eric5.UtilitiesPython2.py2flakes.checker.html#ExportBinding.names" /> <keyword name="ExporterBase" id="ExporterBase" ref="eric5.QScintilla.Exporters.ExporterBase.html#ExporterBase" /> <keyword name="ExporterBase (Constructor)" id="ExporterBase (Constructor)" ref="eric5.QScintilla.Exporters.ExporterBase.html#ExporterBase.__init__" /> @@ -5105,11 +5105,11 @@ <keyword name="Function (Constructor)" id="Function (Constructor)" ref="eric5.Utilities.ModuleParser.html#Function.__init__" /> <keyword name="Function.addDescription" id="Function.addDescription" ref="eric5.Utilities.ModuleParser.html#Function.addDescription" /> <keyword name="Function.setEndLine" id="Function.setEndLine" ref="eric5.Utilities.ModuleParser.html#Function.setEndLine" /> - <keyword name="FunctionDefinition" id="FunctionDefinition" ref="eric5.Utilities.py3flakes.checker.html#FunctionDefinition" /> + <keyword name="FunctionDefinition" id="FunctionDefinition" ref="eric5.Utilities.pyflakes.checker.html#FunctionDefinition" /> <keyword name="FunctionDefinition" id="FunctionDefinition" ref="eric5.UtilitiesPython2.py2flakes.checker.html#FunctionDefinition" /> - <keyword name="FunctionScope" id="FunctionScope" ref="eric5.Utilities.py3flakes.checker.html#FunctionScope" /> + <keyword name="FunctionScope" id="FunctionScope" ref="eric5.Utilities.pyflakes.checker.html#FunctionScope" /> <keyword name="FunctionScope" id="FunctionScope" ref="eric5.UtilitiesPython2.py2flakes.checker.html#FunctionScope" /> - <keyword name="FunctionScope (Constructor)" id="FunctionScope (Constructor)" ref="eric5.Utilities.py3flakes.checker.html#FunctionScope.__init__" /> + <keyword name="FunctionScope (Constructor)" id="FunctionScope (Constructor)" ref="eric5.Utilities.pyflakes.checker.html#FunctionScope.__init__" /> <keyword name="FunctionScope (Constructor)" id="FunctionScope (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.checker.html#FunctionScope.__init__" /> <keyword name="Globals (Package)" id="Globals (Package)" ref="index-eric5.Globals.html" /> <keyword name="GotoDialog" id="GotoDialog" ref="eric5.QScintilla.GotoDialog.html#GotoDialog" /> @@ -6825,17 +6825,17 @@ <keyword name="IconsPreviewDialog" id="IconsPreviewDialog" ref="eric5.Preferences.ConfigurationPages.IconsPreviewDialog.html#IconsPreviewDialog" /> <keyword name="IconsPreviewDialog (Constructor)" id="IconsPreviewDialog (Constructor)" ref="eric5.Preferences.ConfigurationPages.IconsPreviewDialog.html#IconsPreviewDialog.__init__" /> <keyword name="IconsPreviewDialog (Module)" id="IconsPreviewDialog (Module)" ref="eric5.Preferences.ConfigurationPages.IconsPreviewDialog.html" /> - <keyword name="ImportShadowedByLoopVar" id="ImportShadowedByLoopVar" ref="eric5.Utilities.py3flakes.messages.html#ImportShadowedByLoopVar" /> + <keyword name="ImportShadowedByLoopVar" id="ImportShadowedByLoopVar" ref="eric5.Utilities.pyflakes.messages.html#ImportShadowedByLoopVar" /> <keyword name="ImportShadowedByLoopVar" id="ImportShadowedByLoopVar" ref="eric5.UtilitiesPython2.py2flakes.messages.html#ImportShadowedByLoopVar" /> - <keyword name="ImportShadowedByLoopVar (Constructor)" id="ImportShadowedByLoopVar (Constructor)" ref="eric5.Utilities.py3flakes.messages.html#ImportShadowedByLoopVar.__init__" /> + <keyword name="ImportShadowedByLoopVar (Constructor)" id="ImportShadowedByLoopVar (Constructor)" ref="eric5.Utilities.pyflakes.messages.html#ImportShadowedByLoopVar.__init__" /> <keyword name="ImportShadowedByLoopVar (Constructor)" id="ImportShadowedByLoopVar (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.messages.html#ImportShadowedByLoopVar.__init__" /> - <keyword name="ImportStarUsed" id="ImportStarUsed" ref="eric5.Utilities.py3flakes.messages.html#ImportStarUsed" /> + <keyword name="ImportStarUsed" id="ImportStarUsed" ref="eric5.Utilities.pyflakes.messages.html#ImportStarUsed" /> <keyword name="ImportStarUsed" id="ImportStarUsed" ref="eric5.UtilitiesPython2.py2flakes.messages.html#ImportStarUsed" /> - <keyword name="ImportStarUsed (Constructor)" id="ImportStarUsed (Constructor)" ref="eric5.Utilities.py3flakes.messages.html#ImportStarUsed.__init__" /> + <keyword name="ImportStarUsed (Constructor)" id="ImportStarUsed (Constructor)" ref="eric5.Utilities.pyflakes.messages.html#ImportStarUsed.__init__" /> <keyword name="ImportStarUsed (Constructor)" id="ImportStarUsed (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.messages.html#ImportStarUsed.__init__" /> - <keyword name="Importation" id="Importation" ref="eric5.Utilities.py3flakes.checker.html#Importation" /> + <keyword name="Importation" id="Importation" ref="eric5.Utilities.pyflakes.checker.html#Importation" /> <keyword name="Importation" id="Importation" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Importation" /> - <keyword name="Importation (Constructor)" id="Importation (Constructor)" ref="eric5.Utilities.py3flakes.checker.html#Importation.__init__" /> + <keyword name="Importation (Constructor)" id="Importation (Constructor)" ref="eric5.Utilities.pyflakes.checker.html#Importation.__init__" /> <keyword name="Importation (Constructor)" id="Importation (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Importation.__init__" /> <keyword name="ImportsDiagramBuilder" id="ImportsDiagramBuilder" ref="eric5.Graphics.ImportsDiagramBuilder.html#ImportsDiagramBuilder" /> <keyword name="ImportsDiagramBuilder (Constructor)" id="ImportsDiagramBuilder (Constructor)" ref="eric5.Graphics.ImportsDiagramBuilder.html#ImportsDiagramBuilder.__init__" /> @@ -7219,9 +7219,9 @@ <keyword name="JavaScriptExternalObject (Constructor)" id="JavaScriptExternalObject (Constructor)" ref="eric5.Helpviewer.HelpBrowserWV.html#JavaScriptExternalObject.__init__" /> <keyword name="JavaScriptExternalObject.AddSearchProvider" id="JavaScriptExternalObject.AddSearchProvider" ref="eric5.Helpviewer.HelpBrowserWV.html#JavaScriptExternalObject.AddSearchProvider" /> <keyword name="JavaScriptResources (Module)" id="JavaScriptResources (Module)" ref="eric5.Helpviewer.JavaScriptResources.html" /> - <keyword name="LateFutureImport" id="LateFutureImport" ref="eric5.Utilities.py3flakes.messages.html#LateFutureImport" /> + <keyword name="LateFutureImport" id="LateFutureImport" ref="eric5.Utilities.pyflakes.messages.html#LateFutureImport" /> <keyword name="LateFutureImport" id="LateFutureImport" ref="eric5.UtilitiesPython2.py2flakes.messages.html#LateFutureImport" /> - <keyword name="LateFutureImport (Constructor)" id="LateFutureImport (Constructor)" ref="eric5.Utilities.py3flakes.messages.html#LateFutureImport.__init__" /> + <keyword name="LateFutureImport (Constructor)" id="LateFutureImport (Constructor)" ref="eric5.Utilities.pyflakes.messages.html#LateFutureImport.__init__" /> <keyword name="LateFutureImport (Constructor)" id="LateFutureImport (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.messages.html#LateFutureImport.__init__" /> <keyword name="Lexer" id="Lexer" ref="eric5.QScintilla.Lexers.Lexer.html#Lexer" /> <keyword name="Lexer (Constructor)" id="Lexer (Constructor)" ref="eric5.QScintilla.Lexers.Lexer.html#Lexer.__init__" /> @@ -7596,13 +7596,13 @@ <keyword name="MercurialUserDataDialog (Constructor)" id="MercurialUserDataDialog (Constructor)" ref="eric5.Plugins.VcsPlugins.vcsMercurial.ConfigurationPage.MercurialUserDataDialog.html#MercurialUserDataDialog.__init__" /> <keyword name="MercurialUserDataDialog (Module)" id="MercurialUserDataDialog (Module)" ref="eric5.Plugins.VcsPlugins.vcsMercurial.ConfigurationPage.MercurialUserDataDialog.html" /> <keyword name="MercurialUserDataDialog.getData" id="MercurialUserDataDialog.getData" ref="eric5.Plugins.VcsPlugins.vcsMercurial.ConfigurationPage.MercurialUserDataDialog.html#MercurialUserDataDialog.getData" /> - <keyword name="Message" id="Message" ref="eric5.Utilities.py3flakes.messages.html#Message" /> + <keyword name="Message" id="Message" ref="eric5.Utilities.pyflakes.messages.html#Message" /> <keyword name="Message" id="Message" ref="eric5.UtilitiesPython2.py2flakes.messages.html#Message" /> - <keyword name="Message (Constructor)" id="Message (Constructor)" ref="eric5.Utilities.py3flakes.messages.html#Message.__init__" /> + <keyword name="Message (Constructor)" id="Message (Constructor)" ref="eric5.Utilities.pyflakes.messages.html#Message.__init__" /> <keyword name="Message (Constructor)" id="Message (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.messages.html#Message.__init__" /> - <keyword name="Message.__str__" id="Message.__str__" ref="eric5.Utilities.py3flakes.messages.html#Message.__str__" /> + <keyword name="Message.__str__" id="Message.__str__" ref="eric5.Utilities.pyflakes.messages.html#Message.__str__" /> <keyword name="Message.__str__" id="Message.__str__" ref="eric5.UtilitiesPython2.py2flakes.messages.html#Message.__str__" /> - <keyword name="Message.getMessageData" id="Message.getMessageData" ref="eric5.Utilities.py3flakes.messages.html#Message.getMessageData" /> + <keyword name="Message.getMessageData" id="Message.getMessageData" ref="eric5.Utilities.pyflakes.messages.html#Message.getMessageData" /> <keyword name="Message.getMessageData" id="Message.getMessageData" ref="eric5.UtilitiesPython2.py2flakes.messages.html#Message.getMessageData" /> <keyword name="MessageBoxWizard" id="MessageBoxWizard" ref="eric5.Plugins.PluginWizardQMessageBox.html#MessageBoxWizard" /> <keyword name="MessageBoxWizard (Constructor)" id="MessageBoxWizard (Constructor)" ref="eric5.Plugins.PluginWizardQMessageBox.html#MessageBoxWizard.__init__" /> @@ -7768,7 +7768,7 @@ <keyword name="ModuleModel.addClass" id="ModuleModel.addClass" ref="eric5.Graphics.ModuleItem.html#ModuleModel.addClass" /> <keyword name="ModuleModel.getClasses" id="ModuleModel.getClasses" ref="eric5.Graphics.ModuleItem.html#ModuleModel.getClasses" /> <keyword name="ModuleParser (Module)" id="ModuleParser (Module)" ref="eric5.Utilities.ModuleParser.html" /> - <keyword name="ModuleScope" id="ModuleScope" ref="eric5.Utilities.py3flakes.checker.html#ModuleScope" /> + <keyword name="ModuleScope" id="ModuleScope" ref="eric5.Utilities.pyflakes.checker.html#ModuleScope" /> <keyword name="ModuleScope" id="ModuleScope" ref="eric5.UtilitiesPython2.py2flakes.checker.html#ModuleScope" /> <keyword name="MultiProject" id="MultiProject" ref="eric5.MultiProject.MultiProject.html#MultiProject" /> <keyword name="MultiProject (Constructor)" id="MultiProject (Constructor)" ref="eric5.MultiProject.MultiProject.html#MultiProject.__init__" /> @@ -9622,13 +9622,13 @@ <keyword name="RebaseProjectHelper.initMenu" id="RebaseProjectHelper.initMenu" ref="eric5.Plugins.VcsPlugins.vcsMercurial.RebaseExtension.ProjectHelper.html#RebaseProjectHelper.initMenu" /> <keyword name="RebaseProjectHelper.menuTitle" id="RebaseProjectHelper.menuTitle" ref="eric5.Plugins.VcsPlugins.vcsMercurial.RebaseExtension.ProjectHelper.html#RebaseProjectHelper.menuTitle" /> <keyword name="RecursionError" id="RecursionError" ref="eric5.Graphics.GraphicsUtilities.html#RecursionError" /> - <keyword name="RedefinedFunction" id="RedefinedFunction" ref="eric5.Utilities.py3flakes.messages.html#RedefinedFunction" /> + <keyword name="RedefinedFunction" id="RedefinedFunction" ref="eric5.Utilities.pyflakes.messages.html#RedefinedFunction" /> <keyword name="RedefinedFunction" id="RedefinedFunction" ref="eric5.UtilitiesPython2.py2flakes.messages.html#RedefinedFunction" /> - <keyword name="RedefinedFunction (Constructor)" id="RedefinedFunction (Constructor)" ref="eric5.Utilities.py3flakes.messages.html#RedefinedFunction.__init__" /> + <keyword name="RedefinedFunction (Constructor)" id="RedefinedFunction (Constructor)" ref="eric5.Utilities.pyflakes.messages.html#RedefinedFunction.__init__" /> <keyword name="RedefinedFunction (Constructor)" id="RedefinedFunction (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.messages.html#RedefinedFunction.__init__" /> - <keyword name="RedefinedWhileUnused" id="RedefinedWhileUnused" ref="eric5.Utilities.py3flakes.messages.html#RedefinedWhileUnused" /> + <keyword name="RedefinedWhileUnused" id="RedefinedWhileUnused" ref="eric5.Utilities.pyflakes.messages.html#RedefinedWhileUnused" /> <keyword name="RedefinedWhileUnused" id="RedefinedWhileUnused" ref="eric5.UtilitiesPython2.py2flakes.messages.html#RedefinedWhileUnused" /> - <keyword name="RedefinedWhileUnused (Constructor)" id="RedefinedWhileUnused (Constructor)" ref="eric5.Utilities.py3flakes.messages.html#RedefinedWhileUnused.__init__" /> + <keyword name="RedefinedWhileUnused (Constructor)" id="RedefinedWhileUnused (Constructor)" ref="eric5.Utilities.pyflakes.messages.html#RedefinedWhileUnused.__init__" /> <keyword name="RedefinedWhileUnused (Constructor)" id="RedefinedWhileUnused (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.messages.html#RedefinedWhileUnused.__init__" /> <keyword name="Redirector" id="Redirector" ref="eric5.UI.UserInterface.html#Redirector" /> <keyword name="Redirector (Constructor)" id="Redirector (Constructor)" ref="eric5.UI.UserInterface.html#Redirector.__init__" /> @@ -9663,11 +9663,11 @@ <keyword name="SchemeAccessHandler (Constructor)" id="SchemeAccessHandler (Constructor)" ref="eric5.Helpviewer.Network.SchemeAccessHandler.html#SchemeAccessHandler.__init__" /> <keyword name="SchemeAccessHandler (Module)" id="SchemeAccessHandler (Module)" ref="eric5.Helpviewer.Network.SchemeAccessHandler.html" /> <keyword name="SchemeAccessHandler.createRequest" id="SchemeAccessHandler.createRequest" ref="eric5.Helpviewer.Network.SchemeAccessHandler.html#SchemeAccessHandler.createRequest" /> - <keyword name="Scope" id="Scope" ref="eric5.Utilities.py3flakes.checker.html#Scope" /> + <keyword name="Scope" id="Scope" ref="eric5.Utilities.pyflakes.checker.html#Scope" /> <keyword name="Scope" id="Scope" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Scope" /> - <keyword name="Scope (Constructor)" id="Scope (Constructor)" ref="eric5.Utilities.py3flakes.checker.html#Scope.__init__" /> + <keyword name="Scope (Constructor)" id="Scope (Constructor)" ref="eric5.Utilities.pyflakes.checker.html#Scope.__init__" /> <keyword name="Scope (Constructor)" id="Scope (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Scope.__init__" /> - <keyword name="Scope.__repr__" id="Scope.__repr__" ref="eric5.Utilities.py3flakes.checker.html#Scope.__repr__" /> + <keyword name="Scope.__repr__" id="Scope.__repr__" ref="eric5.Utilities.pyflakes.checker.html#Scope.__repr__" /> <keyword name="Scope.__repr__" id="Scope.__repr__" ref="eric5.UtilitiesPython2.py2flakes.checker.html#Scope.__repr__" /> <keyword name="SearchReplaceSlidingWidget" id="SearchReplaceSlidingWidget" ref="eric5.QScintilla.SearchReplaceWidget.html#SearchReplaceSlidingWidget" /> <keyword name="SearchReplaceSlidingWidget (Constructor)" id="SearchReplaceSlidingWidget (Constructor)" ref="eric5.QScintilla.SearchReplaceWidget.html#SearchReplaceSlidingWidget.__init__" /> @@ -11753,19 +11753,19 @@ <keyword name="UMLSceneSizeDialog.getData" id="UMLSceneSizeDialog.getData" ref="eric5.Graphics.UMLSceneSizeDialog.html#UMLSceneSizeDialog.getData" /> <keyword name="Uid" id="Uid" ref="eric5.Utilities.binplistlib.html#Uid" /> <keyword name="Uid.__repr__" id="Uid.__repr__" ref="eric5.Utilities.binplistlib.html#Uid.__repr__" /> - <keyword name="UnBinding" id="UnBinding" ref="eric5.Utilities.py3flakes.checker.html#UnBinding" /> + <keyword name="UnBinding" id="UnBinding" ref="eric5.Utilities.pyflakes.checker.html#UnBinding" /> <keyword name="UnBinding" id="UnBinding" ref="eric5.UtilitiesPython2.py2flakes.checker.html#UnBinding" /> - <keyword name="UndefinedExport" id="UndefinedExport" ref="eric5.Utilities.py3flakes.messages.html#UndefinedExport" /> + <keyword name="UndefinedExport" id="UndefinedExport" ref="eric5.Utilities.pyflakes.messages.html#UndefinedExport" /> <keyword name="UndefinedExport" id="UndefinedExport" ref="eric5.UtilitiesPython2.py2flakes.messages.html#UndefinedExport" /> - <keyword name="UndefinedExport (Constructor)" id="UndefinedExport (Constructor)" ref="eric5.Utilities.py3flakes.messages.html#UndefinedExport.__init__" /> + <keyword name="UndefinedExport (Constructor)" id="UndefinedExport (Constructor)" ref="eric5.Utilities.pyflakes.messages.html#UndefinedExport.__init__" /> <keyword name="UndefinedExport (Constructor)" id="UndefinedExport (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.messages.html#UndefinedExport.__init__" /> - <keyword name="UndefinedLocal" id="UndefinedLocal" ref="eric5.Utilities.py3flakes.messages.html#UndefinedLocal" /> + <keyword name="UndefinedLocal" id="UndefinedLocal" ref="eric5.Utilities.pyflakes.messages.html#UndefinedLocal" /> <keyword name="UndefinedLocal" id="UndefinedLocal" ref="eric5.UtilitiesPython2.py2flakes.messages.html#UndefinedLocal" /> - <keyword name="UndefinedLocal (Constructor)" id="UndefinedLocal (Constructor)" ref="eric5.Utilities.py3flakes.messages.html#UndefinedLocal.__init__" /> + <keyword name="UndefinedLocal (Constructor)" id="UndefinedLocal (Constructor)" ref="eric5.Utilities.pyflakes.messages.html#UndefinedLocal.__init__" /> <keyword name="UndefinedLocal (Constructor)" id="UndefinedLocal (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.messages.html#UndefinedLocal.__init__" /> - <keyword name="UndefinedName" id="UndefinedName" ref="eric5.Utilities.py3flakes.messages.html#UndefinedName" /> + <keyword name="UndefinedName" id="UndefinedName" ref="eric5.Utilities.pyflakes.messages.html#UndefinedName" /> <keyword name="UndefinedName" id="UndefinedName" ref="eric5.UtilitiesPython2.py2flakes.messages.html#UndefinedName" /> - <keyword name="UndefinedName (Constructor)" id="UndefinedName (Constructor)" ref="eric5.Utilities.py3flakes.messages.html#UndefinedName.__init__" /> + <keyword name="UndefinedName (Constructor)" id="UndefinedName (Constructor)" ref="eric5.Utilities.pyflakes.messages.html#UndefinedName.__init__" /> <keyword name="UndefinedName (Constructor)" id="UndefinedName (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.messages.html#UndefinedName.__init__" /> <keyword name="UnittestDialog" id="UnittestDialog" ref="eric5.PyUnit.UnittestDialog.html#UnittestDialog" /> <keyword name="UnittestDialog (Constructor)" id="UnittestDialog (Constructor)" ref="eric5.PyUnit.UnittestDialog.html#UnittestDialog.__init__" /> @@ -11796,13 +11796,13 @@ <keyword name="UnittestWindow" id="UnittestWindow" ref="eric5.PyUnit.UnittestDialog.html#UnittestWindow" /> <keyword name="UnittestWindow (Constructor)" id="UnittestWindow (Constructor)" ref="eric5.PyUnit.UnittestDialog.html#UnittestWindow.__init__" /> <keyword name="UnittestWindow.eventFilter" id="UnittestWindow.eventFilter" ref="eric5.PyUnit.UnittestDialog.html#UnittestWindow.eventFilter" /> - <keyword name="UnusedImport" id="UnusedImport" ref="eric5.Utilities.py3flakes.messages.html#UnusedImport" /> + <keyword name="UnusedImport" id="UnusedImport" ref="eric5.Utilities.pyflakes.messages.html#UnusedImport" /> <keyword name="UnusedImport" id="UnusedImport" ref="eric5.UtilitiesPython2.py2flakes.messages.html#UnusedImport" /> - <keyword name="UnusedImport (Constructor)" id="UnusedImport (Constructor)" ref="eric5.Utilities.py3flakes.messages.html#UnusedImport.__init__" /> + <keyword name="UnusedImport (Constructor)" id="UnusedImport (Constructor)" ref="eric5.Utilities.pyflakes.messages.html#UnusedImport.__init__" /> <keyword name="UnusedImport (Constructor)" id="UnusedImport (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.messages.html#UnusedImport.__init__" /> - <keyword name="UnusedVariable" id="UnusedVariable" ref="eric5.Utilities.py3flakes.messages.html#UnusedVariable" /> + <keyword name="UnusedVariable" id="UnusedVariable" ref="eric5.Utilities.pyflakes.messages.html#UnusedVariable" /> <keyword name="UnusedVariable" id="UnusedVariable" ref="eric5.UtilitiesPython2.py2flakes.messages.html#UnusedVariable" /> - <keyword name="UnusedVariable (Constructor)" id="UnusedVariable (Constructor)" ref="eric5.Utilities.py3flakes.messages.html#UnusedVariable.__init__" /> + <keyword name="UnusedVariable (Constructor)" id="UnusedVariable (Constructor)" ref="eric5.Utilities.pyflakes.messages.html#UnusedVariable.__init__" /> <keyword name="UnusedVariable (Constructor)" id="UnusedVariable (Constructor)" ref="eric5.UtilitiesPython2.py2flakes.messages.html#UnusedVariable.__init__" /> <keyword name="UrlBar" id="UrlBar" ref="eric5.Helpviewer.UrlBar.UrlBar.html#UrlBar" /> <keyword name="UrlBar (Constructor)" id="UrlBar (Constructor)" ref="eric5.Helpviewer.UrlBar.UrlBar.html#UrlBar.__init__" /> @@ -12801,7 +12801,7 @@ <keyword name="check" id="check" ref="eric5.UtilitiesPython2.Tabnanny.html#check" /> <keyword name="checkBlacklistedVersions" id="checkBlacklistedVersions" ref="eric5.Globals.__init__.html#checkBlacklistedVersions" /> <keyword name="checkPyside" id="checkPyside" ref="eric5.Utilities.__init__.html#checkPyside" /> - <keyword name="checker (Module)" id="checker (Module)" ref="eric5.Utilities.py3flakes.checker.html" /> + <keyword name="checker (Module)" id="checker (Module)" ref="eric5.Utilities.pyflakes.checker.html" /> <keyword name="checker (Module)" id="checker (Module)" ref="eric5.UtilitiesPython2.py2flakes.checker.html" /> <keyword name="cleanUp" id="cleanUp" ref="eric5.install.html#cleanUp" /> <keyword name="close" id="close" ref="eric5.DebugClients.Ruby.AsyncFile.html#close" /> @@ -13105,7 +13105,7 @@ <keyword name="getTasks" id="getTasks" ref="eric5.Preferences.__init__.html#getTasks" /> <keyword name="getTemplates" id="getTemplates" ref="eric5.Preferences.__init__.html#getTemplates" /> <keyword name="getTestFileName" id="getTestFileName" ref="eric5.Utilities.__init__.html#getTestFileName" /> - <keyword name="getTranslatedFlakesMessage" id="getTranslatedFlakesMessage" ref="eric5.Utilities.py3flakes.translations.html#getTranslatedFlakesMessage" /> + <keyword name="getTranslatedFlakesMessage" id="getTranslatedFlakesMessage" ref="eric5.Utilities.pyflakes.translations.html#getTranslatedFlakesMessage" /> <keyword name="getTrayStarter" id="getTrayStarter" ref="eric5.Preferences.__init__.html#getTrayStarter" /> <keyword name="getTypeFromTypeName" id="getTypeFromTypeName" ref="eric5.Utilities.ModuleParser.html#getTypeFromTypeName" /> <keyword name="getUI" id="getUI" ref="eric5.Preferences.__init__.html#getUI" /> @@ -13217,7 +13217,7 @@ <keyword name="maximum_line_length" id="maximum_line_length" ref="eric5.UtilitiesPython2.pep8.html#maximum_line_length" /> <keyword name="messageHandler" id="messageHandler" ref="eric5.E5Gui.E5ErrorMessage.html#messageHandler" /> <keyword name="messageHandlerInstalled" id="messageHandlerInstalled" ref="eric5.E5Gui.E5ErrorMessage.html#messageHandlerInstalled" /> - <keyword name="messages (Module)" id="messages (Module)" ref="eric5.Utilities.py3flakes.messages.html" /> + <keyword name="messages (Module)" id="messages (Module)" ref="eric5.Utilities.pyflakes.messages.html" /> <keyword name="messages (Module)" id="messages (Module)" ref="eric5.UtilitiesPython2.py2flakes.messages.html" /> <keyword name="missing_newline" id="missing_newline" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#missing_newline" /> <keyword name="missing_newline" id="missing_newline" ref="eric5.UtilitiesPython2.pep8.html#missing_newline" /> @@ -13270,11 +13270,11 @@ <keyword name="py2flakes (Package)" id="py2flakes (Package)" ref="index-eric5.UtilitiesPython2.py2flakes.html" /> <keyword name="py3AES (Module)" id="py3AES (Module)" ref="eric5.Utilities.crypto.py3AES.html" /> <keyword name="py3PBKDF2 (Module)" id="py3PBKDF2 (Module)" ref="eric5.Utilities.crypto.py3PBKDF2.html" /> - <keyword name="py3flakes (Package)" id="py3flakes (Package)" ref="index-eric5.Utilities.py3flakes.html" /> <keyword name="pyName" id="pyName" ref="eric5.Utilities.uic.html#pyName" /> <keyword name="pyName" id="pyName" ref="eric5.compileUiFiles.html#pyName" /> <keyword name="pyName" id="pyName" ref="eric5.install.html#pyName" /> <keyword name="pyclbr (Module)" id="pyclbr (Module)" ref="eric5.Utilities.ClassBrowsers.pyclbr.html" /> + <keyword name="pyflakes (Package)" id="pyflakes (Package)" ref="index-eric5.Utilities.pyflakes.html" /> <keyword name="python_3000_backticks" id="python_3000_backticks" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#python_3000_backticks" /> <keyword name="python_3000_backticks" id="python_3000_backticks" ref="eric5.UtilitiesPython2.pep8.html#python_3000_backticks" /> <keyword name="python_3000_has_key" id="python_3000_has_key" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#python_3000_has_key" /> @@ -13414,7 +13414,7 @@ <keyword name="trailing_blank_lines" id="trailing_blank_lines" ref="eric5.UtilitiesPython2.pep8.html#trailing_blank_lines" /> <keyword name="trailing_whitespace" id="trailing_whitespace" ref="eric5.Plugins.CheckerPlugins.CodeStyleChecker.pep8.html#trailing_whitespace" /> <keyword name="trailing_whitespace" id="trailing_whitespace" ref="eric5.UtilitiesPython2.pep8.html#trailing_whitespace" /> - <keyword name="translations (Module)" id="translations (Module)" ref="eric5.Utilities.py3flakes.translations.html" /> + <keyword name="translations (Module)" id="translations (Module)" ref="eric5.Utilities.pyflakes.translations.html" /> <keyword name="transplant (Module)" id="transplant (Module)" ref="eric5.Plugins.VcsPlugins.vcsMercurial.TransplantExtension.transplant.html" /> <keyword name="uiStartUp" id="uiStartUp" ref="eric5.eric5.html#uiStartUp" /> <keyword name="uic (Module)" id="uic (Module)" ref="eric5.Utilities.uic.html" /> @@ -14220,6 +14220,9 @@ <file>eric5.Utilities.py3flakes.checker.html</file> <file>eric5.Utilities.py3flakes.messages.html</file> <file>eric5.Utilities.py3flakes.translations.html</file> + <file>eric5.Utilities.pyflakes.checker.html</file> + <file>eric5.Utilities.pyflakes.messages.html</file> + <file>eric5.Utilities.pyflakes.translations.html</file> <file>eric5.Utilities.uic.html</file> <file>eric5.UtilitiesPython2.CodeStyleChecker.html</file> <file>eric5.UtilitiesPython2.DocStyleCheckerPy2.html</file> @@ -14369,6 +14372,7 @@ <file>index-eric5.Utilities.crypto.html</file> <file>index-eric5.Utilities.html</file> <file>index-eric5.Utilities.py3flakes.html</file> + <file>index-eric5.Utilities.pyflakes.html</file> <file>index-eric5.UtilitiesPython2.html</file> <file>index-eric5.UtilitiesPython2.py2flakes.html</file> <file>index-eric5.VCS.html</file>
--- a/Documentation/Source/eric5.Preferences.__init__.html Wed Jan 15 19:05:51 2014 +0100 +++ b/Documentation/Source/eric5.Preferences.__init__.html Wed Jan 15 19:16:06 2014 +0100 @@ -89,7 +89,7 @@ <td>Module function to retrieve the various editor typing settings.</td> </tr><tr> <td><a href="#getFlakes">getFlakes</a></td> -<td>Module function to retrieve the py3flakes related settings.</td> +<td>Module function to retrieve the pyflakes related settings.</td> </tr><tr> <td><a href="#getGeometry">getGeometry</a></td> <td>Module function to retrieve the display geometry.</td> @@ -239,7 +239,7 @@ <td>Module function to store the various editor typing settings.</td> </tr><tr> <td><a href="#setFlakes">setFlakes</a></td> -<td>Module function to store the py3flakes related settings.</td> +<td>Module function to store the pyflakes related settings.</td> </tr><tr> <td><a href="#setGeometry">setGeometry</a></td> <td>Module function to store the display geometry.</td> @@ -351,7 +351,7 @@ object <h3>Class Attributes</h3> <table> -<tr><td>cooperationDefaults</td></tr><tr><td>corbaDefaults</td></tr><tr><td>debuggerDefaults</td></tr><tr><td>editorColourDefaults</td></tr><tr><td>editorDefaults</td></tr><tr><td>editorExporterDefaults</td></tr><tr><td>editorOtherFontsDefaults</td></tr><tr><td>editorTypingDefaults</td></tr><tr><td>geometryDefaults</td></tr><tr><td>graphicsDefaults</td></tr><tr><td>helpDefaults</td></tr><tr><td>iconEditorDefaults</td></tr><tr><td>iconsDefaults</td></tr><tr><td>ircDefaults</td></tr><tr><td>multiProjectDefaults</td></tr><tr><td>pluginManagerDefaults</td></tr><tr><td>printerDefaults</td></tr><tr><td>projectBrowserColourDefaults</td></tr><tr><td>projectBrowserFlagsDefaults</td></tr><tr><td>projectDefaults</td></tr><tr><td>py3flakesDefaults</td></tr><tr><td>qtDefaults</td></tr><tr><td>resetLayout</td></tr><tr><td>shellDefaults</td></tr><tr><td>sysDefaults</td></tr><tr><td>tasksDefaults</td></tr><tr><td>templatesDefaults</td></tr><tr><td>trayStarterDefaults</td></tr><tr><td>uiDefaults</td></tr><tr><td>userDefaults</td></tr><tr><td>varDefaults</td></tr><tr><td>vcsDefaults</td></tr><tr><td>viewProfilesLength</td></tr><tr><td>webSettingsIntitialized</td></tr> +<tr><td>cooperationDefaults</td></tr><tr><td>corbaDefaults</td></tr><tr><td>debuggerDefaults</td></tr><tr><td>editorColourDefaults</td></tr><tr><td>editorDefaults</td></tr><tr><td>editorExporterDefaults</td></tr><tr><td>editorOtherFontsDefaults</td></tr><tr><td>editorTypingDefaults</td></tr><tr><td>geometryDefaults</td></tr><tr><td>graphicsDefaults</td></tr><tr><td>helpDefaults</td></tr><tr><td>iconEditorDefaults</td></tr><tr><td>iconsDefaults</td></tr><tr><td>ircDefaults</td></tr><tr><td>multiProjectDefaults</td></tr><tr><td>pluginManagerDefaults</td></tr><tr><td>printerDefaults</td></tr><tr><td>projectBrowserColourDefaults</td></tr><tr><td>projectBrowserFlagsDefaults</td></tr><tr><td>projectDefaults</td></tr><tr><td>pyflakesDefaults</td></tr><tr><td>qtDefaults</td></tr><tr><td>resetLayout</td></tr><tr><td>shellDefaults</td></tr><tr><td>sysDefaults</td></tr><tr><td>tasksDefaults</td></tr><tr><td>templatesDefaults</td></tr><tr><td>trayStarterDefaults</td></tr><tr><td>uiDefaults</td></tr><tr><td>userDefaults</td></tr><tr><td>varDefaults</td></tr><tr><td>vcsDefaults</td></tr><tr><td>viewProfilesLength</td></tr><tr><td>webSettingsIntitialized</td></tr> </table> <h3>Class Methods</h3> <table> @@ -664,7 +664,7 @@ <h2>getFlakes</h2> <b>getFlakes</b>(<i>key, prefClass=Prefs</i>) <p> - Module function to retrieve the py3flakes related settings. + Module function to retrieve the pyflakes related settings. </p><dl> <dt><i>key</i></dt> <dd> @@ -1610,7 +1610,7 @@ <h2>setFlakes</h2> <b>setFlakes</b>(<i>key, value, prefClass=Prefs</i>) <p> - Module function to store the py3flakes related settings. + Module function to store the pyflakes related settings. </p><dl> <dt><i>key</i></dt> <dd>
--- a/Documentation/Source/eric5.Utilities.py3flakes.checker.html Wed Jan 15 19:05:51 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,719 +0,0 @@ -<!DOCTYPE html> -<html><head> -<title>eric5.Utilities.py3flakes.checker</title> -<meta charset="UTF-8"> -<style> -body { - background: #EDECE6; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #85774A; } -h2 { color: white; background: #85774A; } -h3 { color: white; background: #9D936E; } -h4 { color: white; background: #9D936E; } - -a { color: #BA6D36; } - -</style> -</head> -<body><a NAME="top" ID="top"></a> -<h1>eric5.Utilities.py3flakes.checker</h1> - -<h3>Global Attributes</h3> -<table> -<tr><td>_MAGIC_GLOBALS</td></tr> -</table> -<h3>Classes</h3> -<table> -<tr> -<td><a href="#Argument">Argument</a></td> -<td>Represents binding a name as an argument.</td> -</tr><tr> -<td><a href="#Assignment">Assignment</a></td> -<td>Represents binding a name with an explicit assignment.</td> -</tr><tr> -<td><a href="#Binding">Binding</a></td> -<td>Represents the binding of a value to a name.</td> -</tr><tr> -<td><a href="#Checker">Checker</a></td> -<td>Class to check the cleanliness and sanity of Python code.</td> -</tr><tr> -<td><a href="#ClassScope">ClassScope</a></td> -<td>Class representing a name scope for a class.</td> -</tr><tr> -<td><a href="#ExportBinding">ExportBinding</a></td> -<td>A binding created by an __all__ assignment.</td> -</tr><tr> -<td><a href="#FunctionDefinition">FunctionDefinition</a></td> -<td>Represents a function definition.</td> -</tr><tr> -<td><a href="#FunctionScope">FunctionScope</a></td> -<td>Class representing a name scope for a function.</td> -</tr><tr> -<td><a href="#Importation">Importation</a></td> -<td>A binding created by an import statement.</td> -</tr><tr> -<td><a href="#ModuleScope">ModuleScope</a></td> -<td>Class representing a name scope for a module.</td> -</tr><tr> -<td><a href="#Scope">Scope</a></td> -<td>Class defining the scope base class.</td> -</tr><tr> -<td><a href="#UnBinding">UnBinding</a></td> -<td>Created by the 'del' operator.</td> -</tr> -</table> -<h3>Functions</h3> -<table> -<tr><td>None</td></tr> -</table> -<hr /><hr /> -<a NAME="Argument" ID="Argument"></a> -<h2>Argument</h2> -<p> - Represents binding a name as an argument. -</p> -<h3>Derived from</h3> -Binding -<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>None</td></tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="Assignment" ID="Assignment"></a> -<h2>Assignment</h2> -<p> - Represents binding a name with an explicit assignment. -</p><p> - The checker will raise warnings for any Assignment that isn't used. Also, - the checker does not consider assignments in tuple/list unpacking to be - Assignments, rather it treats them as simple Bindings. -</p> -<h3>Derived from</h3> -Binding -<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>None</td></tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="Binding" ID="Binding"></a> -<h2>Binding</h2> -<p> - Represents the binding of a value to a name. -</p><p> - The checker uses this to keep track of which names have been bound and - which names have not. See Assignment for a special type of binding that - is checked with stricter rules. -</p> -<h3>Derived from</h3> -object -<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="#Binding.__init__">Binding</a></td> -<td></td> -</tr><tr> -<td><a href="#Binding.__repr__">__repr__</a></td> -<td></td> -</tr><tr> -<td><a href="#Binding.__str__">__str__</a></td> -<td></td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="Binding.__init__" ID="Binding.__init__"></a> -<h4>Binding (Constructor)</h4> -<b>Binding</b>(<i>name, source</i>) -<a NAME="Binding.__repr__" ID="Binding.__repr__"></a> -<h4>Binding.__repr__</h4> -<b>__repr__</b>(<i></i>) -<a NAME="Binding.__str__" ID="Binding.__str__"></a> -<h4>Binding.__str__</h4> -<b>__str__</b>(<i></i>) - -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="Checker" ID="Checker"></a> -<h2>Checker</h2> -<p> - Class to check the cleanliness and sanity of Python code. -</p> -<h3>Derived from</h3> -object -<h3>Class Attributes</h3> -<table> -<tr><td>ATTRIBUTES</td></tr><tr><td>BOOLOP</td></tr><tr><td>CALL</td></tr><tr><td>COMPREHENSION</td></tr><tr><td>INVERT</td></tr><tr><td>ISNOT</td></tr><tr><td>LOAD</td></tr><tr><td>MOD</td></tr><tr><td>NONLOCAL</td></tr><tr><td>PASS</td></tr><tr><td>RETURN</td></tr><tr><td>SETCOMP</td></tr><tr><td>SLICE</td></tr><tr><td>TRY</td></tr><tr><td>nodeDepth</td></tr><tr><td>scope</td></tr><tr><td>traceTree</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#Checker.__init__">Checker</a></td> -<td>Constructor</td> -</tr><tr> -<td><a href="#Checker.ASSIGN">ASSIGN</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.AUGASSIGN">AUGASSIGN</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.CLASSDEF">CLASSDEF</a></td> -<td>Check names used in a class definition, including its decorators, base classes, and the body of its definition.</td> -</tr><tr> -<td><a href="#Checker.DICTCOMP">DICTCOMP</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.EXCEPTHANDLER">EXCEPTHANDLER</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.FOR">FOR</a></td> -<td>Process bindings for loop variables.</td> -</tr><tr> -<td><a href="#Checker.FUNCTIONDEF">FUNCTIONDEF</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.GLOBAL">GLOBAL</a></td> -<td>Keep track of globals declarations.</td> -</tr><tr> -<td><a href="#Checker.IMPORT">IMPORT</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.IMPORTFROM">IMPORTFROM</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.LAMBDA">LAMBDA</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.LISTCOMP">LISTCOMP</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.NAME">NAME</a></td> -<td>Handle occurrence of Name (which can be a load/store/delete access.)</td> -</tr><tr> -<td><a href="#Checker.STARRED">STARRED</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker._runDeferred">_runDeferred</a></td> -<td>Run the callables in deferred using their associated scope stack.</td> -</tr><tr> -<td><a href="#Checker.addArgs">addArgs</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.addBinding">addBinding</a></td> -<td>Called when a binding is altered.</td> -</tr><tr> -<td><a href="#Checker.checkUnusedAssignments">checkUnusedAssignments</a></td> -<td>Check to see if any assignments have not been used.</td> -</tr><tr> -<td><a href="#Checker.check_dead_scopes">check_dead_scopes</a></td> -<td>Look at scopes which have been fully examined and report names in them which were imported but unused.</td> -</tr><tr> -<td><a href="#Checker.collectLoopVars">collectLoopVars</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.deferAssignment">deferAssignment</a></td> -<td>Schedule an assignment handler to be called just after deferred function handlers.</td> -</tr><tr> -<td><a href="#Checker.deferFunction">deferFunction</a></td> -<td>Schedule a function handler to be called just before completion.</td> -</tr><tr> -<td><a href="#Checker.handleAssignName">handleAssignName</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.handleBody">handleBody</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.handleChildren">handleChildren</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.handleNode">handleNode</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.ignore">ignore</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.isDocstring">isDocstring</a></td> -<td>Determine if the given node is a docstring, as long as it is at the correct place in the node tree.</td> -</tr><tr> -<td><a href="#Checker.popScope">popScope</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.pushClassScope">pushClassScope</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.pushFunctionScope">pushFunctionScope</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.report">report</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.runFunction">runFunction</a></td> -<td></td> -</tr><tr> -<td><a href="#Checker.scope">scope</a></td> -<td></td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="Checker.__init__" ID="Checker.__init__"></a> -<h4>Checker (Constructor)</h4> -<b>Checker</b>(<i>module, filename='(none)'</i>) -<p> - Constructor -</p><dl> -<dt><i>module</i></dt> -<dd> -parsed module tree or module source code -</dd><dt><i>filename</i></dt> -<dd> -name of the module file (string) -</dd> -</dl><a NAME="Checker.ASSIGN" ID="Checker.ASSIGN"></a> -<h4>Checker.ASSIGN</h4> -<b>ASSIGN</b>(<i>node</i>) -<a NAME="Checker.AUGASSIGN" ID="Checker.AUGASSIGN"></a> -<h4>Checker.AUGASSIGN</h4> -<b>AUGASSIGN</b>(<i>node</i>) -<a NAME="Checker.CLASSDEF" ID="Checker.CLASSDEF"></a> -<h4>Checker.CLASSDEF</h4> -<b>CLASSDEF</b>(<i>node</i>) -<p> - Check names used in a class definition, including its decorators, base - classes, and the body of its definition. Additionally, add its name to - the current scope. -</p><a NAME="Checker.DICTCOMP" ID="Checker.DICTCOMP"></a> -<h4>Checker.DICTCOMP</h4> -<b>DICTCOMP</b>(<i>node</i>) -<a NAME="Checker.EXCEPTHANDLER" ID="Checker.EXCEPTHANDLER"></a> -<h4>Checker.EXCEPTHANDLER</h4> -<b>EXCEPTHANDLER</b>(<i>node</i>) -<a NAME="Checker.FOR" ID="Checker.FOR"></a> -<h4>Checker.FOR</h4> -<b>FOR</b>(<i>node</i>) -<p> - Process bindings for loop variables. -</p><a NAME="Checker.FUNCTIONDEF" ID="Checker.FUNCTIONDEF"></a> -<h4>Checker.FUNCTIONDEF</h4> -<b>FUNCTIONDEF</b>(<i>node</i>) -<a NAME="Checker.GLOBAL" ID="Checker.GLOBAL"></a> -<h4>Checker.GLOBAL</h4> -<b>GLOBAL</b>(<i>node</i>) -<p> - Keep track of globals declarations. -</p><a NAME="Checker.IMPORT" ID="Checker.IMPORT"></a> -<h4>Checker.IMPORT</h4> -<b>IMPORT</b>(<i>node</i>) -<a NAME="Checker.IMPORTFROM" ID="Checker.IMPORTFROM"></a> -<h4>Checker.IMPORTFROM</h4> -<b>IMPORTFROM</b>(<i>node</i>) -<a NAME="Checker.LAMBDA" ID="Checker.LAMBDA"></a> -<h4>Checker.LAMBDA</h4> -<b>LAMBDA</b>(<i>node</i>) -<a NAME="Checker.LISTCOMP" ID="Checker.LISTCOMP"></a> -<h4>Checker.LISTCOMP</h4> -<b>LISTCOMP</b>(<i>node</i>) -<a NAME="Checker.NAME" ID="Checker.NAME"></a> -<h4>Checker.NAME</h4> -<b>NAME</b>(<i>node</i>) -<p> - Handle occurrence of Name (which can be a load/store/delete access.) -</p><a NAME="Checker.STARRED" ID="Checker.STARRED"></a> -<h4>Checker.STARRED</h4> -<b>STARRED</b>(<i>node</i>) -<a NAME="Checker._runDeferred" ID="Checker._runDeferred"></a> -<h4>Checker._runDeferred</h4> -<b>_runDeferred</b>(<i>deferred</i>) -<p> - Run the callables in deferred using their associated scope stack. -</p><a NAME="Checker.addArgs" ID="Checker.addArgs"></a> -<h4>Checker.addArgs</h4> -<b>addArgs</b>(<i></i>) -<a NAME="Checker.addBinding" ID="Checker.addBinding"></a> -<h4>Checker.addBinding</h4> -<b>addBinding</b>(<i>lineno, value, reportRedef=True</i>) -<p> - Called when a binding is altered. -</p><dl> -<dt><i>lineno</i></dt> -<dd> -line of the statement responsible for the change - (integer) -</dd><dt><i>value</i></dt> -<dd> -the optional new value, a Binding instance, associated - with the binding; if None, the binding is deleted if it exists -</dd><dt><i>reportRedef</i></dt> -<dd> -flag indicating if rebinding while unused will be - reported (boolean) -</dd> -</dl><a NAME="Checker.checkUnusedAssignments" ID="Checker.checkUnusedAssignments"></a> -<h4>Checker.checkUnusedAssignments</h4> -<b>checkUnusedAssignments</b>(<i></i>) -<p> - Check to see if any assignments have not been used. -</p><a NAME="Checker.check_dead_scopes" ID="Checker.check_dead_scopes"></a> -<h4>Checker.check_dead_scopes</h4> -<b>check_dead_scopes</b>(<i></i>) -<p> - Look at scopes which have been fully examined and report names in them - which were imported but unused. -</p><a NAME="Checker.collectLoopVars" ID="Checker.collectLoopVars"></a> -<h4>Checker.collectLoopVars</h4> -<b>collectLoopVars</b>(<i></i>) -<a NAME="Checker.deferAssignment" ID="Checker.deferAssignment"></a> -<h4>Checker.deferAssignment</h4> -<b>deferAssignment</b>(<i>callable</i>) -<p> - Schedule an assignment handler to be called just after deferred - function handlers. -</p><a NAME="Checker.deferFunction" ID="Checker.deferFunction"></a> -<h4>Checker.deferFunction</h4> -<b>deferFunction</b>(<i>callable</i>) -<p> - Schedule a function handler to be called just before completion. -</p><p> - This is used for handling function bodies, which must be deferred - because code later in the file might modify the global scope. When - `callable` is called, the scope at the time this is called will be - restored, however it will contain any new bindings added to it. -</p><a NAME="Checker.handleAssignName" ID="Checker.handleAssignName"></a> -<h4>Checker.handleAssignName</h4> -<b>handleAssignName</b>(<i>node</i>) -<a NAME="Checker.handleBody" ID="Checker.handleBody"></a> -<h4>Checker.handleBody</h4> -<b>handleBody</b>(<i>tree</i>) -<a NAME="Checker.handleChildren" ID="Checker.handleChildren"></a> -<h4>Checker.handleChildren</h4> -<b>handleChildren</b>(<i>tree</i>) -<a NAME="Checker.handleNode" ID="Checker.handleNode"></a> -<h4>Checker.handleNode</h4> -<b>handleNode</b>(<i>node, parent</i>) -<a NAME="Checker.ignore" ID="Checker.ignore"></a> -<h4>Checker.ignore</h4> -<b>ignore</b>(<i>node</i>) -<a NAME="Checker.isDocstring" ID="Checker.isDocstring"></a> -<h4>Checker.isDocstring</h4> -<b>isDocstring</b>(<i>node</i>) -<p> - Determine if the given node is a docstring, as long as it is at the - correct place in the node tree. -</p><a NAME="Checker.popScope" ID="Checker.popScope"></a> -<h4>Checker.popScope</h4> -<b>popScope</b>(<i></i>) -<a NAME="Checker.pushClassScope" ID="Checker.pushClassScope"></a> -<h4>Checker.pushClassScope</h4> -<b>pushClassScope</b>(<i></i>) -<a NAME="Checker.pushFunctionScope" ID="Checker.pushFunctionScope"></a> -<h4>Checker.pushFunctionScope</h4> -<b>pushFunctionScope</b>(<i></i>) -<a NAME="Checker.report" ID="Checker.report"></a> -<h4>Checker.report</h4> -<b>report</b>(<i>messageClass, *args, **kwargs</i>) -<a NAME="Checker.runFunction" ID="Checker.runFunction"></a> -<h4>Checker.runFunction</h4> -<b>runFunction</b>(<i></i>) -<a NAME="Checker.scope" ID="Checker.scope"></a> -<h4>Checker.scope</h4> -<b>scope</b>(<i></i>) - -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="ClassScope" ID="ClassScope"></a> -<h2>ClassScope</h2> -<p> - Class representing a name scope for a class. -</p> -<h3>Derived from</h3> -Scope -<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>None</td></tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="ExportBinding" ID="ExportBinding"></a> -<h2>ExportBinding</h2> -<p> - A binding created by an __all__ assignment. If the names in the list - can be determined statically, they will be treated as names for export and - additional checking applied to them. -</p><p> - The only __all__ assignment that can be recognized is one which takes - the value of a literal list containing literal strings. For example:: -</p><p> - __all__ = ["foo", "bar"] -</p><p> - Names which are imported and not otherwise used but appear in the value of - __all__ will not have an unused import warning reported for them. -</p> -<h3>Derived from</h3> -Binding -<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="#ExportBinding.names">names</a></td> -<td>Return a list of the names referenced by this binding.</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="ExportBinding.names" ID="ExportBinding.names"></a> -<h4>ExportBinding.names</h4> -<b>names</b>(<i></i>) -<p> - Return a list of the names referenced by this binding. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="FunctionDefinition" ID="FunctionDefinition"></a> -<h2>FunctionDefinition</h2> -<p> - Represents a function definition. -</p> -<h3>Derived from</h3> -Binding -<h3>Class Attributes</h3> -<table> -<tr><td>is_property</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="FunctionScope" ID="FunctionScope"></a> -<h2>FunctionScope</h2> -<p> - Class representing a name scope for a function. -</p> -<h3>Derived from</h3> -Scope -<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="#FunctionScope.__init__">FunctionScope</a></td> -<td></td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="FunctionScope.__init__" ID="FunctionScope.__init__"></a> -<h4>FunctionScope (Constructor)</h4> -<b>FunctionScope</b>(<i></i>) - -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="Importation" ID="Importation"></a> -<h2>Importation</h2> -<p> - A binding created by an import statement. -</p> -<h3>Derived from</h3> -Binding -<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="#Importation.__init__">Importation</a></td> -<td></td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="Importation.__init__" ID="Importation.__init__"></a> -<h4>Importation (Constructor)</h4> -<b>Importation</b>(<i>name, source</i>) - -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="ModuleScope" ID="ModuleScope"></a> -<h2>ModuleScope</h2> -<p> - Class representing a name scope for a module. -</p> -<h3>Derived from</h3> -Scope -<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>None</td></tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="Scope" ID="Scope"></a> -<h2>Scope</h2> -<p> - Class defining the scope base class. -</p> -<h3>Derived from</h3> -dict -<h3>Class Attributes</h3> -<table> -<tr><td>importStarred</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#Scope.__init__">Scope</a></td> -<td></td> -</tr><tr> -<td><a href="#Scope.__repr__">__repr__</a></td> -<td></td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="Scope.__init__" ID="Scope.__init__"></a> -<h4>Scope (Constructor)</h4> -<b>Scope</b>(<i></i>) -<a NAME="Scope.__repr__" ID="Scope.__repr__"></a> -<h4>Scope.__repr__</h4> -<b>__repr__</b>(<i></i>) - -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="UnBinding" ID="UnBinding"></a> -<h2>UnBinding</h2> -<p> - Created by the 'del' operator. -</p> -<h3>Derived from</h3> -Binding -<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>None</td></tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> - -<div align="right"><a href="#top">Up</a></div> -<hr /> -</body></html> \ No newline at end of file
--- a/Documentation/Source/eric5.Utilities.py3flakes.messages.html Wed Jan 15 19:05:51 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,654 +0,0 @@ -<!DOCTYPE html> -<html><head> -<title>eric5.Utilities.py3flakes.messages</title> -<meta charset="UTF-8"> -<style> -body { - background: #EDECE6; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #85774A; } -h2 { color: white; background: #85774A; } -h3 { color: white; background: #9D936E; } -h4 { color: white; background: #9D936E; } - -a { color: #BA6D36; } - -</style> -</head> -<body><a NAME="top" ID="top"></a> -<h1>eric5.Utilities.py3flakes.messages</h1> -<p> -Module implementing the messages for py3flakes. -</p> -<h3>Global Attributes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Classes</h3> -<table> -<tr> -<td><a href="#DuplicateArgument">DuplicateArgument</a></td> -<td>Class defining the "Duplicate Argument" message.</td> -</tr><tr> -<td><a href="#ImportShadowedByLoopVar">ImportShadowedByLoopVar</a></td> -<td>Class defining the "Import Shadowed By Loop Var" message.</td> -</tr><tr> -<td><a href="#ImportStarUsed">ImportStarUsed</a></td> -<td>Class defining the "Import Star Used" message.</td> -</tr><tr> -<td><a href="#LateFutureImport">LateFutureImport</a></td> -<td>Class defining the "Late Future Import" message.</td> -</tr><tr> -<td><a href="#Message">Message</a></td> -<td>Class defining the base for all specific message classes.</td> -</tr><tr> -<td><a href="#RedefinedFunction">RedefinedFunction</a></td> -<td>Class defining the "Redefined Function" message.</td> -</tr><tr> -<td><a href="#RedefinedWhileUnused">RedefinedWhileUnused</a></td> -<td>Class defining the "Redefined While Unused" message.</td> -</tr><tr> -<td><a href="#UndefinedExport">UndefinedExport</a></td> -<td>Class defining the "Undefined Export" message.</td> -</tr><tr> -<td><a href="#UndefinedLocal">UndefinedLocal</a></td> -<td>Class defining the "Undefined Local Variable" message.</td> -</tr><tr> -<td><a href="#UndefinedName">UndefinedName</a></td> -<td>Class defining the "Undefined Name" message.</td> -</tr><tr> -<td><a href="#UnusedImport">UnusedImport</a></td> -<td>Class defining the "Unused Import" message.</td> -</tr><tr> -<td><a href="#UnusedVariable">UnusedVariable</a></td> -<td>Class defining the "Unused Variable" message.</td> -</tr> -</table> -<h3>Functions</h3> -<table> -<tr><td>None</td></tr> -</table> -<hr /><hr /> -<a NAME="DuplicateArgument" ID="DuplicateArgument"></a> -<h2>DuplicateArgument</h2> -<p> - Class defining the "Duplicate Argument" message. -</p> -<h3>Derived from</h3> -Message -<h3>Class Attributes</h3> -<table> -<tr><td>message</td></tr><tr><td>message_id</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#DuplicateArgument.__init__">DuplicateArgument</a></td> -<td>Constructor</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="DuplicateArgument.__init__" ID="DuplicateArgument.__init__"></a> -<h4>DuplicateArgument (Constructor)</h4> -<b>DuplicateArgument</b>(<i>filename, lineno, name</i>) -<p> - Constructor -</p><dl> -<dt><i>filename</i></dt> -<dd> -name of the file (string) -</dd><dt><i>lineno</i></dt> -<dd> -line number (integer) -</dd><dt><i>name</i></dt> -<dd> -name of the duplicate argument (string) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="ImportShadowedByLoopVar" ID="ImportShadowedByLoopVar"></a> -<h2>ImportShadowedByLoopVar</h2> -<p> - Class defining the "Import Shadowed By Loop Var" message. -</p> -<h3>Derived from</h3> -Message -<h3>Class Attributes</h3> -<table> -<tr><td>message</td></tr><tr><td>message_id</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#ImportShadowedByLoopVar.__init__">ImportShadowedByLoopVar</a></td> -<td>Constructor</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="ImportShadowedByLoopVar.__init__" ID="ImportShadowedByLoopVar.__init__"></a> -<h4>ImportShadowedByLoopVar (Constructor)</h4> -<b>ImportShadowedByLoopVar</b>(<i>filename, lineno, name, orig_lineno</i>) -<p> - Constructor -</p><dl> -<dt><i>filename</i></dt> -<dd> -name of the file (string) -</dd><dt><i>lineno</i></dt> -<dd> -line number (integer) -</dd><dt><i>name</i></dt> -<dd> -name of the shadowed import (string) -</dd><dt><i>orig_lineno</i></dt> -<dd> -line number of the import (integer) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="ImportStarUsed" ID="ImportStarUsed"></a> -<h2>ImportStarUsed</h2> -<p> - Class defining the "Import Star Used" message. -</p> -<h3>Derived from</h3> -Message -<h3>Class Attributes</h3> -<table> -<tr><td>message</td></tr><tr><td>message_id</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#ImportStarUsed.__init__">ImportStarUsed</a></td> -<td>Constructor</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="ImportStarUsed.__init__" ID="ImportStarUsed.__init__"></a> -<h4>ImportStarUsed (Constructor)</h4> -<b>ImportStarUsed</b>(<i>filename, lineno, modname</i>) -<p> - Constructor -</p><dl> -<dt><i>filename</i></dt> -<dd> -name of the file (string) -</dd><dt><i>lineno</i></dt> -<dd> -line number (integer) -</dd><dt><i>modname</i></dt> -<dd> -name of the module imported using star import (string) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="LateFutureImport" ID="LateFutureImport"></a> -<h2>LateFutureImport</h2> -<p> - Class defining the "Late Future Import" message. -</p> -<h3>Derived from</h3> -Message -<h3>Class Attributes</h3> -<table> -<tr><td>message</td></tr><tr><td>message_id</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#LateFutureImport.__init__">LateFutureImport</a></td> -<td>Constructor</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="LateFutureImport.__init__" ID="LateFutureImport.__init__"></a> -<h4>LateFutureImport (Constructor)</h4> -<b>LateFutureImport</b>(<i>filename, lineno, names</i>) -<p> - Constructor -</p><dl> -<dt><i>filename</i></dt> -<dd> -name of the file (string) -</dd><dt><i>lineno</i></dt> -<dd> -line number (integer) -</dd><dt><i>names</i></dt> -<dd> -names of the imported futures (string) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="Message" ID="Message"></a> -<h2>Message</h2> -<p> - Class defining the base for all specific message classes. -</p> -<h3>Derived from</h3> -object -<h3>Class Attributes</h3> -<table> -<tr><td>message</td></tr><tr><td>message_args</td></tr><tr><td>message_id</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#Message.__init__">Message</a></td> -<td>Constructor</td> -</tr><tr> -<td><a href="#Message.__str__">__str__</a></td> -<td>Special method return a string representation of the instance object.</td> -</tr><tr> -<td><a href="#Message.getMessageData">getMessageData</a></td> -<td>Public method to get the individual message data elements.</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="Message.__init__" ID="Message.__init__"></a> -<h4>Message (Constructor)</h4> -<b>Message</b>(<i>filename, lineno</i>) -<p> - Constructor -</p><dl> -<dt><i>filename</i></dt> -<dd> -name of the file (string) -</dd><dt><i>lineno</i></dt> -<dd> -line number (integer) -</dd> -</dl><a NAME="Message.__str__" ID="Message.__str__"></a> -<h4>Message.__str__</h4> -<b>__str__</b>(<i></i>) -<p> - Special method return a string representation of the instance object. -</p><dl> -<dt>Returns:</dt> -<dd> -string representation of the object (string) -</dd> -</dl><a NAME="Message.getMessageData" ID="Message.getMessageData"></a> -<h4>Message.getMessageData</h4> -<b>getMessageData</b>(<i></i>) -<p> - Public method to get the individual message data elements. -</p><dl> -<dt>Returns:</dt> -<dd> -tuple containing file name, line number, message ID and - message arguments (string, integer, string, list) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="RedefinedFunction" ID="RedefinedFunction"></a> -<h2>RedefinedFunction</h2> -<p> - Class defining the "Redefined Function" message. -</p> -<h3>Derived from</h3> -Message -<h3>Class Attributes</h3> -<table> -<tr><td>message</td></tr><tr><td>message_id</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#RedefinedFunction.__init__">RedefinedFunction</a></td> -<td>Constructor</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="RedefinedFunction.__init__" ID="RedefinedFunction.__init__"></a> -<h4>RedefinedFunction (Constructor)</h4> -<b>RedefinedFunction</b>(<i>filename, lineno, name, orig_lineno</i>) -<p> - Constructor -</p><dl> -<dt><i>filename</i></dt> -<dd> -name of the file (string) -</dd><dt><i>lineno</i></dt> -<dd> -line number (integer) -</dd><dt><i>name</i></dt> -<dd> -name of the redefined function (string) -</dd><dt><i>orig_lineno</i></dt> -<dd> -line number of the original definition (integer) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="RedefinedWhileUnused" ID="RedefinedWhileUnused"></a> -<h2>RedefinedWhileUnused</h2> -<p> - Class defining the "Redefined While Unused" message. -</p> -<h3>Derived from</h3> -Message -<h3>Class Attributes</h3> -<table> -<tr><td>message</td></tr><tr><td>message_id</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#RedefinedWhileUnused.__init__">RedefinedWhileUnused</a></td> -<td>Constructor</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="RedefinedWhileUnused.__init__" ID="RedefinedWhileUnused.__init__"></a> -<h4>RedefinedWhileUnused (Constructor)</h4> -<b>RedefinedWhileUnused</b>(<i>filename, lineno, name, orig_lineno</i>) -<p> - Constructor -</p><dl> -<dt><i>filename</i></dt> -<dd> -name of the file (string) -</dd><dt><i>lineno</i></dt> -<dd> -line number (integer) -</dd><dt><i>name</i></dt> -<dd> -name of the redefined object (string) -</dd><dt><i>orig_lineno</i></dt> -<dd> -line number of the original definition (integer) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="UndefinedExport" ID="UndefinedExport"></a> -<h2>UndefinedExport</h2> -<p> - Class defining the "Undefined Export" message. -</p> -<h3>Derived from</h3> -Message -<h3>Class Attributes</h3> -<table> -<tr><td>message</td></tr><tr><td>message_id</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#UndefinedExport.__init__">UndefinedExport</a></td> -<td>Constructor</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="UndefinedExport.__init__" ID="UndefinedExport.__init__"></a> -<h4>UndefinedExport (Constructor)</h4> -<b>UndefinedExport</b>(<i>filename, lineno, name</i>) -<p> - Constructor -</p><dl> -<dt><i>filename</i></dt> -<dd> -name of the file (string) -</dd><dt><i>lineno</i></dt> -<dd> -line number (integer) -</dd><dt><i>name</i></dt> -<dd> -undefined exported name (string) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="UndefinedLocal" ID="UndefinedLocal"></a> -<h2>UndefinedLocal</h2> -<p> - Class defining the "Undefined Local Variable" message. -</p> -<h3>Derived from</h3> -Message -<h3>Class Attributes</h3> -<table> -<tr><td>message</td></tr><tr><td>message_id</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#UndefinedLocal.__init__">UndefinedLocal</a></td> -<td>Constructor</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="UndefinedLocal.__init__" ID="UndefinedLocal.__init__"></a> -<h4>UndefinedLocal (Constructor)</h4> -<b>UndefinedLocal</b>(<i>filename, lineno, name, orig_lineno</i>) -<p> - Constructor -</p><dl> -<dt><i>filename</i></dt> -<dd> -name of the file (string) -</dd><dt><i>lineno</i></dt> -<dd> -line number (integer) -</dd><dt><i>name</i></dt> -<dd> -name of the prematurely referenced variable (string) -</dd><dt><i>orig_lineno</i></dt> -<dd> -line number of the variable definition (integer) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="UndefinedName" ID="UndefinedName"></a> -<h2>UndefinedName</h2> -<p> - Class defining the "Undefined Name" message. -</p> -<h3>Derived from</h3> -Message -<h3>Class Attributes</h3> -<table> -<tr><td>message</td></tr><tr><td>message_id</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#UndefinedName.__init__">UndefinedName</a></td> -<td>Constructor</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="UndefinedName.__init__" ID="UndefinedName.__init__"></a> -<h4>UndefinedName (Constructor)</h4> -<b>UndefinedName</b>(<i>filename, lineno, name</i>) -<p> - Constructor -</p><dl> -<dt><i>filename</i></dt> -<dd> -name of the file (string) -</dd><dt><i>lineno</i></dt> -<dd> -line number (integer) -</dd><dt><i>name</i></dt> -<dd> -undefined name (string) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="UnusedImport" ID="UnusedImport"></a> -<h2>UnusedImport</h2> -<p> - Class defining the "Unused Import" message. -</p> -<h3>Derived from</h3> -Message -<h3>Class Attributes</h3> -<table> -<tr><td>message</td></tr><tr><td>message_id</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#UnusedImport.__init__">UnusedImport</a></td> -<td>Constructor</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="UnusedImport.__init__" ID="UnusedImport.__init__"></a> -<h4>UnusedImport (Constructor)</h4> -<b>UnusedImport</b>(<i>filename, lineno, name</i>) -<p> - Constructor -</p><dl> -<dt><i>filename</i></dt> -<dd> -name of the file (string) -</dd><dt><i>lineno</i></dt> -<dd> -line number (integer) -</dd><dt><i>name</i></dt> -<dd> -name of the unused import (string) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="UnusedVariable" ID="UnusedVariable"></a> -<h2>UnusedVariable</h2> -<p> - Class defining the "Unused Variable" message. -</p><p> - Indicates that a variable has been explicitly assigned to but not actually - used. -</p> -<h3>Derived from</h3> -Message -<h3>Class Attributes</h3> -<table> -<tr><td>message</td></tr><tr><td>message_id</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#UnusedVariable.__init__">UnusedVariable</a></td> -<td>Constructor</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="UnusedVariable.__init__" ID="UnusedVariable.__init__"></a> -<h4>UnusedVariable (Constructor)</h4> -<b>UnusedVariable</b>(<i>filename, lineno, name</i>) -<p> - Constructor -</p><dl> -<dt><i>filename</i></dt> -<dd> -name of the file (string) -</dd><dt><i>lineno</i></dt> -<dd> -line number (integer) -</dd><dt><i>name</i></dt> -<dd> -name of the unused variable (string) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /> -</body></html> \ No newline at end of file
--- a/Documentation/Source/eric5.Utilities.py3flakes.translations.html Wed Jan 15 19:05:51 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -<!DOCTYPE html> -<html><head> -<title>eric5.Utilities.py3flakes.translations</title> -<meta charset="UTF-8"> -<style> -body { - background: #EDECE6; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #85774A; } -h2 { color: white; background: #85774A; } -h3 { color: white; background: #9D936E; } -h4 { color: white; background: #9D936E; } - -a { color: #BA6D36; } - -</style> -</head> -<body><a NAME="top" ID="top"></a> -<h1>eric5.Utilities.py3flakes.translations</h1> -<p> -Module implementing message translations for pyflakes warning messages. -</p> -<h3>Global Attributes</h3> -<table> -<tr><td>__all__</td></tr><tr><td>_messages</td></tr> -</table> -<h3>Classes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Functions</h3> -<table> -<tr> -<td><a href="#getTranslatedFlakesMessage">getTranslatedFlakesMessage</a></td> -<td>Module function to get a translated and formatted message for a given pyflakes message ID.</td> -</tr> -</table> -<hr /><hr /> -<a NAME="getTranslatedFlakesMessage" ID="getTranslatedFlakesMessage"></a> -<h2>getTranslatedFlakesMessage</h2> -<b>getTranslatedFlakesMessage</b>(<i>message_id, message_args</i>) -<p> - Module function to get a translated and formatted message for a - given pyflakes message ID. -</p><dl> -<dt><i>message_id</i></dt> -<dd> -message ID (string) -</dd><dt><i>message_args</i></dt> -<dd> -arguments for a formatted message (list) -</dd> -</dl><dl> -<dt>Returns:</dt> -<dd> -translated and formatted message (string) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /> -</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Documentation/Source/eric5.Utilities.pyflakes.checker.html Wed Jan 15 19:16:06 2014 +0100 @@ -0,0 +1,719 @@ +<!DOCTYPE html> +<html><head> +<title>eric5.Utilities.pyflakes.checker</title> +<meta charset="UTF-8"> +<style> +body { + background: #EDECE6; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #85774A; } +h2 { color: white; background: #85774A; } +h3 { color: white; background: #9D936E; } +h4 { color: white; background: #9D936E; } + +a { color: #BA6D36; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>eric5.Utilities.pyflakes.checker</h1> + +<h3>Global Attributes</h3> +<table> +<tr><td>_MAGIC_GLOBALS</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#Argument">Argument</a></td> +<td>Represents binding a name as an argument.</td> +</tr><tr> +<td><a href="#Assignment">Assignment</a></td> +<td>Represents binding a name with an explicit assignment.</td> +</tr><tr> +<td><a href="#Binding">Binding</a></td> +<td>Represents the binding of a value to a name.</td> +</tr><tr> +<td><a href="#Checker">Checker</a></td> +<td>Class to check the cleanliness and sanity of Python code.</td> +</tr><tr> +<td><a href="#ClassScope">ClassScope</a></td> +<td>Class representing a name scope for a class.</td> +</tr><tr> +<td><a href="#ExportBinding">ExportBinding</a></td> +<td>A binding created by an __all__ assignment.</td> +</tr><tr> +<td><a href="#FunctionDefinition">FunctionDefinition</a></td> +<td>Represents a function definition.</td> +</tr><tr> +<td><a href="#FunctionScope">FunctionScope</a></td> +<td>Class representing a name scope for a function.</td> +</tr><tr> +<td><a href="#Importation">Importation</a></td> +<td>A binding created by an import statement.</td> +</tr><tr> +<td><a href="#ModuleScope">ModuleScope</a></td> +<td>Class representing a name scope for a module.</td> +</tr><tr> +<td><a href="#Scope">Scope</a></td> +<td>Class defining the scope base class.</td> +</tr><tr> +<td><a href="#UnBinding">UnBinding</a></td> +<td>Created by the 'del' operator.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> +<hr /><hr /> +<a NAME="Argument" ID="Argument"></a> +<h2>Argument</h2> +<p> + Represents binding a name as an argument. +</p> +<h3>Derived from</h3> +Binding +<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>None</td></tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="Assignment" ID="Assignment"></a> +<h2>Assignment</h2> +<p> + Represents binding a name with an explicit assignment. +</p><p> + The checker will raise warnings for any Assignment that isn't used. Also, + the checker does not consider assignments in tuple/list unpacking to be + Assignments, rather it treats them as simple Bindings. +</p> +<h3>Derived from</h3> +Binding +<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>None</td></tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="Binding" ID="Binding"></a> +<h2>Binding</h2> +<p> + Represents the binding of a value to a name. +</p><p> + The checker uses this to keep track of which names have been bound and + which names have not. See Assignment for a special type of binding that + is checked with stricter rules. +</p> +<h3>Derived from</h3> +object +<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="#Binding.__init__">Binding</a></td> +<td></td> +</tr><tr> +<td><a href="#Binding.__repr__">__repr__</a></td> +<td></td> +</tr><tr> +<td><a href="#Binding.__str__">__str__</a></td> +<td></td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="Binding.__init__" ID="Binding.__init__"></a> +<h4>Binding (Constructor)</h4> +<b>Binding</b>(<i>name, source</i>) +<a NAME="Binding.__repr__" ID="Binding.__repr__"></a> +<h4>Binding.__repr__</h4> +<b>__repr__</b>(<i></i>) +<a NAME="Binding.__str__" ID="Binding.__str__"></a> +<h4>Binding.__str__</h4> +<b>__str__</b>(<i></i>) + +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="Checker" ID="Checker"></a> +<h2>Checker</h2> +<p> + Class to check the cleanliness and sanity of Python code. +</p> +<h3>Derived from</h3> +object +<h3>Class Attributes</h3> +<table> +<tr><td>ATTRIBUTES</td></tr><tr><td>BOOLOP</td></tr><tr><td>CALL</td></tr><tr><td>COMPREHENSION</td></tr><tr><td>INVERT</td></tr><tr><td>ISNOT</td></tr><tr><td>LOAD</td></tr><tr><td>MOD</td></tr><tr><td>NONLOCAL</td></tr><tr><td>PASS</td></tr><tr><td>RETURN</td></tr><tr><td>SETCOMP</td></tr><tr><td>SLICE</td></tr><tr><td>TRY</td></tr><tr><td>nodeDepth</td></tr><tr><td>scope</td></tr><tr><td>traceTree</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#Checker.__init__">Checker</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#Checker.ASSIGN">ASSIGN</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.AUGASSIGN">AUGASSIGN</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.CLASSDEF">CLASSDEF</a></td> +<td>Check names used in a class definition, including its decorators, base classes, and the body of its definition.</td> +</tr><tr> +<td><a href="#Checker.DICTCOMP">DICTCOMP</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.EXCEPTHANDLER">EXCEPTHANDLER</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.FOR">FOR</a></td> +<td>Process bindings for loop variables.</td> +</tr><tr> +<td><a href="#Checker.FUNCTIONDEF">FUNCTIONDEF</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.GLOBAL">GLOBAL</a></td> +<td>Keep track of globals declarations.</td> +</tr><tr> +<td><a href="#Checker.IMPORT">IMPORT</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.IMPORTFROM">IMPORTFROM</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.LAMBDA">LAMBDA</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.LISTCOMP">LISTCOMP</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.NAME">NAME</a></td> +<td>Handle occurrence of Name (which can be a load/store/delete access.)</td> +</tr><tr> +<td><a href="#Checker.STARRED">STARRED</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker._runDeferred">_runDeferred</a></td> +<td>Run the callables in deferred using their associated scope stack.</td> +</tr><tr> +<td><a href="#Checker.addArgs">addArgs</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.addBinding">addBinding</a></td> +<td>Called when a binding is altered.</td> +</tr><tr> +<td><a href="#Checker.checkUnusedAssignments">checkUnusedAssignments</a></td> +<td>Check to see if any assignments have not been used.</td> +</tr><tr> +<td><a href="#Checker.check_dead_scopes">check_dead_scopes</a></td> +<td>Look at scopes which have been fully examined and report names in them which were imported but unused.</td> +</tr><tr> +<td><a href="#Checker.collectLoopVars">collectLoopVars</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.deferAssignment">deferAssignment</a></td> +<td>Schedule an assignment handler to be called just after deferred function handlers.</td> +</tr><tr> +<td><a href="#Checker.deferFunction">deferFunction</a></td> +<td>Schedule a function handler to be called just before completion.</td> +</tr><tr> +<td><a href="#Checker.handleAssignName">handleAssignName</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.handleBody">handleBody</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.handleChildren">handleChildren</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.handleNode">handleNode</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.ignore">ignore</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.isDocstring">isDocstring</a></td> +<td>Determine if the given node is a docstring, as long as it is at the correct place in the node tree.</td> +</tr><tr> +<td><a href="#Checker.popScope">popScope</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.pushClassScope">pushClassScope</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.pushFunctionScope">pushFunctionScope</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.report">report</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.runFunction">runFunction</a></td> +<td></td> +</tr><tr> +<td><a href="#Checker.scope">scope</a></td> +<td></td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="Checker.__init__" ID="Checker.__init__"></a> +<h4>Checker (Constructor)</h4> +<b>Checker</b>(<i>module, filename='(none)'</i>) +<p> + Constructor +</p><dl> +<dt><i>module</i></dt> +<dd> +parsed module tree or module source code +</dd><dt><i>filename</i></dt> +<dd> +name of the module file (string) +</dd> +</dl><a NAME="Checker.ASSIGN" ID="Checker.ASSIGN"></a> +<h4>Checker.ASSIGN</h4> +<b>ASSIGN</b>(<i>node</i>) +<a NAME="Checker.AUGASSIGN" ID="Checker.AUGASSIGN"></a> +<h4>Checker.AUGASSIGN</h4> +<b>AUGASSIGN</b>(<i>node</i>) +<a NAME="Checker.CLASSDEF" ID="Checker.CLASSDEF"></a> +<h4>Checker.CLASSDEF</h4> +<b>CLASSDEF</b>(<i>node</i>) +<p> + Check names used in a class definition, including its decorators, base + classes, and the body of its definition. Additionally, add its name to + the current scope. +</p><a NAME="Checker.DICTCOMP" ID="Checker.DICTCOMP"></a> +<h4>Checker.DICTCOMP</h4> +<b>DICTCOMP</b>(<i>node</i>) +<a NAME="Checker.EXCEPTHANDLER" ID="Checker.EXCEPTHANDLER"></a> +<h4>Checker.EXCEPTHANDLER</h4> +<b>EXCEPTHANDLER</b>(<i>node</i>) +<a NAME="Checker.FOR" ID="Checker.FOR"></a> +<h4>Checker.FOR</h4> +<b>FOR</b>(<i>node</i>) +<p> + Process bindings for loop variables. +</p><a NAME="Checker.FUNCTIONDEF" ID="Checker.FUNCTIONDEF"></a> +<h4>Checker.FUNCTIONDEF</h4> +<b>FUNCTIONDEF</b>(<i>node</i>) +<a NAME="Checker.GLOBAL" ID="Checker.GLOBAL"></a> +<h4>Checker.GLOBAL</h4> +<b>GLOBAL</b>(<i>node</i>) +<p> + Keep track of globals declarations. +</p><a NAME="Checker.IMPORT" ID="Checker.IMPORT"></a> +<h4>Checker.IMPORT</h4> +<b>IMPORT</b>(<i>node</i>) +<a NAME="Checker.IMPORTFROM" ID="Checker.IMPORTFROM"></a> +<h4>Checker.IMPORTFROM</h4> +<b>IMPORTFROM</b>(<i>node</i>) +<a NAME="Checker.LAMBDA" ID="Checker.LAMBDA"></a> +<h4>Checker.LAMBDA</h4> +<b>LAMBDA</b>(<i>node</i>) +<a NAME="Checker.LISTCOMP" ID="Checker.LISTCOMP"></a> +<h4>Checker.LISTCOMP</h4> +<b>LISTCOMP</b>(<i>node</i>) +<a NAME="Checker.NAME" ID="Checker.NAME"></a> +<h4>Checker.NAME</h4> +<b>NAME</b>(<i>node</i>) +<p> + Handle occurrence of Name (which can be a load/store/delete access.) +</p><a NAME="Checker.STARRED" ID="Checker.STARRED"></a> +<h4>Checker.STARRED</h4> +<b>STARRED</b>(<i>node</i>) +<a NAME="Checker._runDeferred" ID="Checker._runDeferred"></a> +<h4>Checker._runDeferred</h4> +<b>_runDeferred</b>(<i>deferred</i>) +<p> + Run the callables in deferred using their associated scope stack. +</p><a NAME="Checker.addArgs" ID="Checker.addArgs"></a> +<h4>Checker.addArgs</h4> +<b>addArgs</b>(<i></i>) +<a NAME="Checker.addBinding" ID="Checker.addBinding"></a> +<h4>Checker.addBinding</h4> +<b>addBinding</b>(<i>lineno, value, reportRedef=True</i>) +<p> + Called when a binding is altered. +</p><dl> +<dt><i>lineno</i></dt> +<dd> +line of the statement responsible for the change + (integer) +</dd><dt><i>value</i></dt> +<dd> +the optional new value, a Binding instance, associated + with the binding; if None, the binding is deleted if it exists +</dd><dt><i>reportRedef</i></dt> +<dd> +flag indicating if rebinding while unused will be + reported (boolean) +</dd> +</dl><a NAME="Checker.checkUnusedAssignments" ID="Checker.checkUnusedAssignments"></a> +<h4>Checker.checkUnusedAssignments</h4> +<b>checkUnusedAssignments</b>(<i></i>) +<p> + Check to see if any assignments have not been used. +</p><a NAME="Checker.check_dead_scopes" ID="Checker.check_dead_scopes"></a> +<h4>Checker.check_dead_scopes</h4> +<b>check_dead_scopes</b>(<i></i>) +<p> + Look at scopes which have been fully examined and report names in them + which were imported but unused. +</p><a NAME="Checker.collectLoopVars" ID="Checker.collectLoopVars"></a> +<h4>Checker.collectLoopVars</h4> +<b>collectLoopVars</b>(<i></i>) +<a NAME="Checker.deferAssignment" ID="Checker.deferAssignment"></a> +<h4>Checker.deferAssignment</h4> +<b>deferAssignment</b>(<i>callable</i>) +<p> + Schedule an assignment handler to be called just after deferred + function handlers. +</p><a NAME="Checker.deferFunction" ID="Checker.deferFunction"></a> +<h4>Checker.deferFunction</h4> +<b>deferFunction</b>(<i>callable</i>) +<p> + Schedule a function handler to be called just before completion. +</p><p> + This is used for handling function bodies, which must be deferred + because code later in the file might modify the global scope. When + `callable` is called, the scope at the time this is called will be + restored, however it will contain any new bindings added to it. +</p><a NAME="Checker.handleAssignName" ID="Checker.handleAssignName"></a> +<h4>Checker.handleAssignName</h4> +<b>handleAssignName</b>(<i>node</i>) +<a NAME="Checker.handleBody" ID="Checker.handleBody"></a> +<h4>Checker.handleBody</h4> +<b>handleBody</b>(<i>tree</i>) +<a NAME="Checker.handleChildren" ID="Checker.handleChildren"></a> +<h4>Checker.handleChildren</h4> +<b>handleChildren</b>(<i>tree</i>) +<a NAME="Checker.handleNode" ID="Checker.handleNode"></a> +<h4>Checker.handleNode</h4> +<b>handleNode</b>(<i>node, parent</i>) +<a NAME="Checker.ignore" ID="Checker.ignore"></a> +<h4>Checker.ignore</h4> +<b>ignore</b>(<i>node</i>) +<a NAME="Checker.isDocstring" ID="Checker.isDocstring"></a> +<h4>Checker.isDocstring</h4> +<b>isDocstring</b>(<i>node</i>) +<p> + Determine if the given node is a docstring, as long as it is at the + correct place in the node tree. +</p><a NAME="Checker.popScope" ID="Checker.popScope"></a> +<h4>Checker.popScope</h4> +<b>popScope</b>(<i></i>) +<a NAME="Checker.pushClassScope" ID="Checker.pushClassScope"></a> +<h4>Checker.pushClassScope</h4> +<b>pushClassScope</b>(<i></i>) +<a NAME="Checker.pushFunctionScope" ID="Checker.pushFunctionScope"></a> +<h4>Checker.pushFunctionScope</h4> +<b>pushFunctionScope</b>(<i></i>) +<a NAME="Checker.report" ID="Checker.report"></a> +<h4>Checker.report</h4> +<b>report</b>(<i>messageClass, *args, **kwargs</i>) +<a NAME="Checker.runFunction" ID="Checker.runFunction"></a> +<h4>Checker.runFunction</h4> +<b>runFunction</b>(<i></i>) +<a NAME="Checker.scope" ID="Checker.scope"></a> +<h4>Checker.scope</h4> +<b>scope</b>(<i></i>) + +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="ClassScope" ID="ClassScope"></a> +<h2>ClassScope</h2> +<p> + Class representing a name scope for a class. +</p> +<h3>Derived from</h3> +Scope +<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>None</td></tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="ExportBinding" ID="ExportBinding"></a> +<h2>ExportBinding</h2> +<p> + A binding created by an __all__ assignment. If the names in the list + can be determined statically, they will be treated as names for export and + additional checking applied to them. +</p><p> + The only __all__ assignment that can be recognized is one which takes + the value of a literal list containing literal strings. For example:: +</p><p> + __all__ = ["foo", "bar"] +</p><p> + Names which are imported and not otherwise used but appear in the value of + __all__ will not have an unused import warning reported for them. +</p> +<h3>Derived from</h3> +Binding +<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="#ExportBinding.names">names</a></td> +<td>Return a list of the names referenced by this binding.</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="ExportBinding.names" ID="ExportBinding.names"></a> +<h4>ExportBinding.names</h4> +<b>names</b>(<i></i>) +<p> + Return a list of the names referenced by this binding. +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="FunctionDefinition" ID="FunctionDefinition"></a> +<h2>FunctionDefinition</h2> +<p> + Represents a function definition. +</p> +<h3>Derived from</h3> +Binding +<h3>Class Attributes</h3> +<table> +<tr><td>is_property</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="FunctionScope" ID="FunctionScope"></a> +<h2>FunctionScope</h2> +<p> + Class representing a name scope for a function. +</p> +<h3>Derived from</h3> +Scope +<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="#FunctionScope.__init__">FunctionScope</a></td> +<td></td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="FunctionScope.__init__" ID="FunctionScope.__init__"></a> +<h4>FunctionScope (Constructor)</h4> +<b>FunctionScope</b>(<i></i>) + +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="Importation" ID="Importation"></a> +<h2>Importation</h2> +<p> + A binding created by an import statement. +</p> +<h3>Derived from</h3> +Binding +<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="#Importation.__init__">Importation</a></td> +<td></td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="Importation.__init__" ID="Importation.__init__"></a> +<h4>Importation (Constructor)</h4> +<b>Importation</b>(<i>name, source</i>) + +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="ModuleScope" ID="ModuleScope"></a> +<h2>ModuleScope</h2> +<p> + Class representing a name scope for a module. +</p> +<h3>Derived from</h3> +Scope +<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>None</td></tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="Scope" ID="Scope"></a> +<h2>Scope</h2> +<p> + Class defining the scope base class. +</p> +<h3>Derived from</h3> +dict +<h3>Class Attributes</h3> +<table> +<tr><td>importStarred</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#Scope.__init__">Scope</a></td> +<td></td> +</tr><tr> +<td><a href="#Scope.__repr__">__repr__</a></td> +<td></td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="Scope.__init__" ID="Scope.__init__"></a> +<h4>Scope (Constructor)</h4> +<b>Scope</b>(<i></i>) +<a NAME="Scope.__repr__" ID="Scope.__repr__"></a> +<h4>Scope.__repr__</h4> +<b>__repr__</b>(<i></i>) + +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="UnBinding" ID="UnBinding"></a> +<h2>UnBinding</h2> +<p> + Created by the 'del' operator. +</p> +<h3>Derived from</h3> +Binding +<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>None</td></tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> + +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Documentation/Source/eric5.Utilities.pyflakes.messages.html Wed Jan 15 19:16:06 2014 +0100 @@ -0,0 +1,654 @@ +<!DOCTYPE html> +<html><head> +<title>eric5.Utilities.pyflakes.messages</title> +<meta charset="UTF-8"> +<style> +body { + background: #EDECE6; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #85774A; } +h2 { color: white; background: #85774A; } +h3 { color: white; background: #9D936E; } +h4 { color: white; background: #9D936E; } + +a { color: #BA6D36; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>eric5.Utilities.pyflakes.messages</h1> +<p> +Module implementing the messages for pyflakes. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#DuplicateArgument">DuplicateArgument</a></td> +<td>Class defining the "Duplicate Argument" message.</td> +</tr><tr> +<td><a href="#ImportShadowedByLoopVar">ImportShadowedByLoopVar</a></td> +<td>Class defining the "Import Shadowed By Loop Var" message.</td> +</tr><tr> +<td><a href="#ImportStarUsed">ImportStarUsed</a></td> +<td>Class defining the "Import Star Used" message.</td> +</tr><tr> +<td><a href="#LateFutureImport">LateFutureImport</a></td> +<td>Class defining the "Late Future Import" message.</td> +</tr><tr> +<td><a href="#Message">Message</a></td> +<td>Class defining the base for all specific message classes.</td> +</tr><tr> +<td><a href="#RedefinedFunction">RedefinedFunction</a></td> +<td>Class defining the "Redefined Function" message.</td> +</tr><tr> +<td><a href="#RedefinedWhileUnused">RedefinedWhileUnused</a></td> +<td>Class defining the "Redefined While Unused" message.</td> +</tr><tr> +<td><a href="#UndefinedExport">UndefinedExport</a></td> +<td>Class defining the "Undefined Export" message.</td> +</tr><tr> +<td><a href="#UndefinedLocal">UndefinedLocal</a></td> +<td>Class defining the "Undefined Local Variable" message.</td> +</tr><tr> +<td><a href="#UndefinedName">UndefinedName</a></td> +<td>Class defining the "Undefined Name" message.</td> +</tr><tr> +<td><a href="#UnusedImport">UnusedImport</a></td> +<td>Class defining the "Unused Import" message.</td> +</tr><tr> +<td><a href="#UnusedVariable">UnusedVariable</a></td> +<td>Class defining the "Unused Variable" message.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> +<hr /><hr /> +<a NAME="DuplicateArgument" ID="DuplicateArgument"></a> +<h2>DuplicateArgument</h2> +<p> + Class defining the "Duplicate Argument" message. +</p> +<h3>Derived from</h3> +Message +<h3>Class Attributes</h3> +<table> +<tr><td>message</td></tr><tr><td>message_id</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#DuplicateArgument.__init__">DuplicateArgument</a></td> +<td>Constructor</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="DuplicateArgument.__init__" ID="DuplicateArgument.__init__"></a> +<h4>DuplicateArgument (Constructor)</h4> +<b>DuplicateArgument</b>(<i>filename, lineno, name</i>) +<p> + Constructor +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file (string) +</dd><dt><i>lineno</i></dt> +<dd> +line number (integer) +</dd><dt><i>name</i></dt> +<dd> +name of the duplicate argument (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="ImportShadowedByLoopVar" ID="ImportShadowedByLoopVar"></a> +<h2>ImportShadowedByLoopVar</h2> +<p> + Class defining the "Import Shadowed By Loop Var" message. +</p> +<h3>Derived from</h3> +Message +<h3>Class Attributes</h3> +<table> +<tr><td>message</td></tr><tr><td>message_id</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#ImportShadowedByLoopVar.__init__">ImportShadowedByLoopVar</a></td> +<td>Constructor</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="ImportShadowedByLoopVar.__init__" ID="ImportShadowedByLoopVar.__init__"></a> +<h4>ImportShadowedByLoopVar (Constructor)</h4> +<b>ImportShadowedByLoopVar</b>(<i>filename, lineno, name, orig_lineno</i>) +<p> + Constructor +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file (string) +</dd><dt><i>lineno</i></dt> +<dd> +line number (integer) +</dd><dt><i>name</i></dt> +<dd> +name of the shadowed import (string) +</dd><dt><i>orig_lineno</i></dt> +<dd> +line number of the import (integer) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="ImportStarUsed" ID="ImportStarUsed"></a> +<h2>ImportStarUsed</h2> +<p> + Class defining the "Import Star Used" message. +</p> +<h3>Derived from</h3> +Message +<h3>Class Attributes</h3> +<table> +<tr><td>message</td></tr><tr><td>message_id</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#ImportStarUsed.__init__">ImportStarUsed</a></td> +<td>Constructor</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="ImportStarUsed.__init__" ID="ImportStarUsed.__init__"></a> +<h4>ImportStarUsed (Constructor)</h4> +<b>ImportStarUsed</b>(<i>filename, lineno, modname</i>) +<p> + Constructor +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file (string) +</dd><dt><i>lineno</i></dt> +<dd> +line number (integer) +</dd><dt><i>modname</i></dt> +<dd> +name of the module imported using star import (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="LateFutureImport" ID="LateFutureImport"></a> +<h2>LateFutureImport</h2> +<p> + Class defining the "Late Future Import" message. +</p> +<h3>Derived from</h3> +Message +<h3>Class Attributes</h3> +<table> +<tr><td>message</td></tr><tr><td>message_id</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#LateFutureImport.__init__">LateFutureImport</a></td> +<td>Constructor</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="LateFutureImport.__init__" ID="LateFutureImport.__init__"></a> +<h4>LateFutureImport (Constructor)</h4> +<b>LateFutureImport</b>(<i>filename, lineno, names</i>) +<p> + Constructor +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file (string) +</dd><dt><i>lineno</i></dt> +<dd> +line number (integer) +</dd><dt><i>names</i></dt> +<dd> +names of the imported futures (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="Message" ID="Message"></a> +<h2>Message</h2> +<p> + Class defining the base for all specific message classes. +</p> +<h3>Derived from</h3> +object +<h3>Class Attributes</h3> +<table> +<tr><td>message</td></tr><tr><td>message_args</td></tr><tr><td>message_id</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#Message.__init__">Message</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#Message.__str__">__str__</a></td> +<td>Special method return a string representation of the instance object.</td> +</tr><tr> +<td><a href="#Message.getMessageData">getMessageData</a></td> +<td>Public method to get the individual message data elements.</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="Message.__init__" ID="Message.__init__"></a> +<h4>Message (Constructor)</h4> +<b>Message</b>(<i>filename, lineno</i>) +<p> + Constructor +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file (string) +</dd><dt><i>lineno</i></dt> +<dd> +line number (integer) +</dd> +</dl><a NAME="Message.__str__" ID="Message.__str__"></a> +<h4>Message.__str__</h4> +<b>__str__</b>(<i></i>) +<p> + Special method return a string representation of the instance object. +</p><dl> +<dt>Returns:</dt> +<dd> +string representation of the object (string) +</dd> +</dl><a NAME="Message.getMessageData" ID="Message.getMessageData"></a> +<h4>Message.getMessageData</h4> +<b>getMessageData</b>(<i></i>) +<p> + Public method to get the individual message data elements. +</p><dl> +<dt>Returns:</dt> +<dd> +tuple containing file name, line number, message ID and + message arguments (string, integer, string, list) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="RedefinedFunction" ID="RedefinedFunction"></a> +<h2>RedefinedFunction</h2> +<p> + Class defining the "Redefined Function" message. +</p> +<h3>Derived from</h3> +Message +<h3>Class Attributes</h3> +<table> +<tr><td>message</td></tr><tr><td>message_id</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#RedefinedFunction.__init__">RedefinedFunction</a></td> +<td>Constructor</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="RedefinedFunction.__init__" ID="RedefinedFunction.__init__"></a> +<h4>RedefinedFunction (Constructor)</h4> +<b>RedefinedFunction</b>(<i>filename, lineno, name, orig_lineno</i>) +<p> + Constructor +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file (string) +</dd><dt><i>lineno</i></dt> +<dd> +line number (integer) +</dd><dt><i>name</i></dt> +<dd> +name of the redefined function (string) +</dd><dt><i>orig_lineno</i></dt> +<dd> +line number of the original definition (integer) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="RedefinedWhileUnused" ID="RedefinedWhileUnused"></a> +<h2>RedefinedWhileUnused</h2> +<p> + Class defining the "Redefined While Unused" message. +</p> +<h3>Derived from</h3> +Message +<h3>Class Attributes</h3> +<table> +<tr><td>message</td></tr><tr><td>message_id</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#RedefinedWhileUnused.__init__">RedefinedWhileUnused</a></td> +<td>Constructor</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="RedefinedWhileUnused.__init__" ID="RedefinedWhileUnused.__init__"></a> +<h4>RedefinedWhileUnused (Constructor)</h4> +<b>RedefinedWhileUnused</b>(<i>filename, lineno, name, orig_lineno</i>) +<p> + Constructor +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file (string) +</dd><dt><i>lineno</i></dt> +<dd> +line number (integer) +</dd><dt><i>name</i></dt> +<dd> +name of the redefined object (string) +</dd><dt><i>orig_lineno</i></dt> +<dd> +line number of the original definition (integer) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="UndefinedExport" ID="UndefinedExport"></a> +<h2>UndefinedExport</h2> +<p> + Class defining the "Undefined Export" message. +</p> +<h3>Derived from</h3> +Message +<h3>Class Attributes</h3> +<table> +<tr><td>message</td></tr><tr><td>message_id</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#UndefinedExport.__init__">UndefinedExport</a></td> +<td>Constructor</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="UndefinedExport.__init__" ID="UndefinedExport.__init__"></a> +<h4>UndefinedExport (Constructor)</h4> +<b>UndefinedExport</b>(<i>filename, lineno, name</i>) +<p> + Constructor +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file (string) +</dd><dt><i>lineno</i></dt> +<dd> +line number (integer) +</dd><dt><i>name</i></dt> +<dd> +undefined exported name (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="UndefinedLocal" ID="UndefinedLocal"></a> +<h2>UndefinedLocal</h2> +<p> + Class defining the "Undefined Local Variable" message. +</p> +<h3>Derived from</h3> +Message +<h3>Class Attributes</h3> +<table> +<tr><td>message</td></tr><tr><td>message_id</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#UndefinedLocal.__init__">UndefinedLocal</a></td> +<td>Constructor</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="UndefinedLocal.__init__" ID="UndefinedLocal.__init__"></a> +<h4>UndefinedLocal (Constructor)</h4> +<b>UndefinedLocal</b>(<i>filename, lineno, name, orig_lineno</i>) +<p> + Constructor +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file (string) +</dd><dt><i>lineno</i></dt> +<dd> +line number (integer) +</dd><dt><i>name</i></dt> +<dd> +name of the prematurely referenced variable (string) +</dd><dt><i>orig_lineno</i></dt> +<dd> +line number of the variable definition (integer) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="UndefinedName" ID="UndefinedName"></a> +<h2>UndefinedName</h2> +<p> + Class defining the "Undefined Name" message. +</p> +<h3>Derived from</h3> +Message +<h3>Class Attributes</h3> +<table> +<tr><td>message</td></tr><tr><td>message_id</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#UndefinedName.__init__">UndefinedName</a></td> +<td>Constructor</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="UndefinedName.__init__" ID="UndefinedName.__init__"></a> +<h4>UndefinedName (Constructor)</h4> +<b>UndefinedName</b>(<i>filename, lineno, name</i>) +<p> + Constructor +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file (string) +</dd><dt><i>lineno</i></dt> +<dd> +line number (integer) +</dd><dt><i>name</i></dt> +<dd> +undefined name (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="UnusedImport" ID="UnusedImport"></a> +<h2>UnusedImport</h2> +<p> + Class defining the "Unused Import" message. +</p> +<h3>Derived from</h3> +Message +<h3>Class Attributes</h3> +<table> +<tr><td>message</td></tr><tr><td>message_id</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#UnusedImport.__init__">UnusedImport</a></td> +<td>Constructor</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="UnusedImport.__init__" ID="UnusedImport.__init__"></a> +<h4>UnusedImport (Constructor)</h4> +<b>UnusedImport</b>(<i>filename, lineno, name</i>) +<p> + Constructor +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file (string) +</dd><dt><i>lineno</i></dt> +<dd> +line number (integer) +</dd><dt><i>name</i></dt> +<dd> +name of the unused import (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="UnusedVariable" ID="UnusedVariable"></a> +<h2>UnusedVariable</h2> +<p> + Class defining the "Unused Variable" message. +</p><p> + Indicates that a variable has been explicitly assigned to but not actually + used. +</p> +<h3>Derived from</h3> +Message +<h3>Class Attributes</h3> +<table> +<tr><td>message</td></tr><tr><td>message_id</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#UnusedVariable.__init__">UnusedVariable</a></td> +<td>Constructor</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="UnusedVariable.__init__" ID="UnusedVariable.__init__"></a> +<h4>UnusedVariable (Constructor)</h4> +<b>UnusedVariable</b>(<i>filename, lineno, name</i>) +<p> + Constructor +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file (string) +</dd><dt><i>lineno</i></dt> +<dd> +line number (integer) +</dd><dt><i>name</i></dt> +<dd> +name of the unused variable (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Documentation/Source/eric5.Utilities.pyflakes.translations.html Wed Jan 15 19:16:06 2014 +0100 @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html><head> +<title>eric5.Utilities.pyflakes.translations</title> +<meta charset="UTF-8"> +<style> +body { + background: #EDECE6; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #85774A; } +h2 { color: white; background: #85774A; } +h3 { color: white; background: #9D936E; } +h4 { color: white; background: #9D936E; } + +a { color: #BA6D36; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>eric5.Utilities.pyflakes.translations</h1> +<p> +Module implementing message translations for pyflakes warning messages. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>__all__</td></tr><tr><td>_messages</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Functions</h3> +<table> +<tr> +<td><a href="#getTranslatedFlakesMessage">getTranslatedFlakesMessage</a></td> +<td>Module function to get a translated and formatted message for a given pyflakes message ID.</td> +</tr> +</table> +<hr /><hr /> +<a NAME="getTranslatedFlakesMessage" ID="getTranslatedFlakesMessage"></a> +<h2>getTranslatedFlakesMessage</h2> +<b>getTranslatedFlakesMessage</b>(<i>message_id, message_args</i>) +<p> + Module function to get a translated and formatted message for a + given pyflakes message ID. +</p><dl> +<dt><i>message_id</i></dt> +<dd> +message ID (string) +</dd><dt><i>message_args</i></dt> +<dd> +arguments for a formatted message (list) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +translated and formatted message (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file
--- a/Documentation/Source/index-eric5.Utilities.html Wed Jan 15 19:05:51 2014 +0100 +++ b/Documentation/Source/index-eric5.Utilities.html Wed Jan 15 19:16:06 2014 +0100 @@ -33,7 +33,7 @@ <td><a href="index-eric5.Utilities.crypto.html">crypto</a></td> <td>Package implementing cryptography related functionality.</td> </tr><tr> -<td><a href="index-eric5.Utilities.py3flakes.html">py3flakes</a></td> +<td><a href="index-eric5.Utilities.pyflakes.html">pyflakes</a></td> <td>Package containg the pyflakes Python3 port adapted for Qt.</td> </tr> </table>
--- a/Documentation/Source/index-eric5.Utilities.py3flakes.html Wed Jan 15 19:05:51 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -<!DOCTYPE html> -<html><head> -<title>eric5.Utilities.py3flakes</title> -<meta charset="UTF-8"> -<style> -body { - background: #EDECE6; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #85774A; } -h2 { color: white; background: #85774A; } -h3 { color: white; background: #9D936E; } -h4 { color: white; background: #9D936E; } - -a { color: #BA6D36; } - -</style> -</head> -<body> -<h1>eric5.Utilities.py3flakes</h1> -<p> -Package containg the pyflakes Python3 port adapted for Qt. -</p> - - -<h3>Modules</h3> -<table> -<tr> -<td><a href="eric5.Utilities.py3flakes.checker.html">checker</a></td> -<td></td> -</tr><tr> -<td><a href="eric5.Utilities.py3flakes.messages.html">messages</a></td> -<td>Module implementing the messages for py3flakes.</td> -</tr><tr> -<td><a href="eric5.Utilities.py3flakes.translations.html">translations</a></td> -<td>Module implementing message translations for pyflakes warning messages.</td> -</tr> -</table> -</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Documentation/Source/index-eric5.Utilities.pyflakes.html Wed Jan 15 19:16:06 2014 +0100 @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<html><head> +<title>eric5.Utilities.pyflakes</title> +<meta charset="UTF-8"> +<style> +body { + background: #EDECE6; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #85774A; } +h2 { color: white; background: #85774A; } +h3 { color: white; background: #9D936E; } +h4 { color: white; background: #9D936E; } + +a { color: #BA6D36; } + +</style> +</head> +<body> +<h1>eric5.Utilities.pyflakes</h1> +<p> +Package containg the pyflakes Python3 port adapted for Qt. +</p> + + +<h3>Modules</h3> +<table> +<tr> +<td><a href="eric5.Utilities.pyflakes.checker.html">checker</a></td> +<td></td> +</tr><tr> +<td><a href="eric5.Utilities.pyflakes.messages.html">messages</a></td> +<td>Module implementing the messages for pyflakes.</td> +</tr><tr> +<td><a href="eric5.Utilities.pyflakes.translations.html">translations</a></td> +<td>Module implementing message translations for pyflakes warning messages.</td> +</tr> +</table> +</body></html> \ No newline at end of file
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py Wed Jan 15 19:05:51 2014 +0100 +++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py Wed Jan 15 19:16:06 2014 +0100 @@ -237,10 +237,10 @@ if Preferences.getFlakes("IncludeInSyntaxCheck"): if isPy3: try: - from Utilities.py3flakes.checker import Checker - from Utilities.py3flakes.messages import \ + from Utilities.pyflakes.checker import Checker + from Utilities.pyflakes.messages import \ ImportStarUsed - from Utilities.py3flakes.translations import \ + from Utilities.pyflakes.translations import \ getTranslatedFlakesMessage sourceLines = source.splitlines() warnings = Checker(source, file)
--- a/Preferences/__init__.py Wed Jan 15 19:05:51 2014 +0100 +++ b/Preferences/__init__.py Wed Jan 15 19:16:06 2014 +0100 @@ -977,8 +977,8 @@ "IconEditorState": QByteArray(), } - # defaults for py3flakes - py3flakesDefaults = { + # defaults for pyflakes + pyflakesDefaults = { "IncludeInSyntaxCheck": True, "IgnoreStarImportWarnings": True, } @@ -2706,7 +2706,7 @@ def getFlakes(key, prefClass=Prefs): """ - Module function to retrieve the py3flakes related settings. + Module function to retrieve the pyflakes related settings. @param key the key of the value to get @param prefClass preferences class used as the storage area @@ -2714,15 +2714,15 @@ """ if key in ["IncludeInSyntaxCheck", "IgnoreStarImportWarnings"]: return toBool(prefClass.settings.value("Py3Flakes/" + key, - prefClass.py3flakesDefaults[key])) + prefClass.pyflakesDefaults[key])) else: return prefClass.settings.value( - "Py3Flakes/" + key, prefClass.py3flakesDefaults[key]) + "Py3Flakes/" + key, prefClass.pyflakesDefaults[key]) def setFlakes(key, value, prefClass=Prefs): """ - Module function to store the py3flakes related settings. + Module function to store the pyflakes related settings. @param key the key of the setting to be set @param value the value to be set
--- a/QScintilla/Editor.py Wed Jan 15 19:05:51 2014 +0100 +++ b/QScintilla/Editor.py Wed Jan 15 19:16:06 2014 +0100 @@ -4994,9 +4994,9 @@ int(errorline), int(errorindex), True, _error) else: if Preferences.getFlakes("IncludeInSyntaxCheck"): - from Utilities.py3flakes.checker import Checker - from Utilities.py3flakes.messages import ImportStarUsed - from Utilities.py3flakes.translations import \ + from Utilities.pyflakes.checker import Checker + from Utilities.pyflakes.messages import ImportStarUsed + from Utilities.pyflakes.translations import \ getTranslatedFlakesMessage ignoreStarImportWarnings = \ @@ -5043,7 +5043,7 @@ self.toggleSyntaxError( int(errorline), int(errorindex), True, _error) else: - from Utilities.py3flakes.translations import \ + from Utilities.pyflakes.translations import \ getTranslatedFlakesMessage for warning in warnings: self.toggleWarning(
--- a/Utilities/py3flakes/__init__.py Wed Jan 15 19:05:51 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> -# - -""" -Package containg the pyflakes Python3 port adapted for Qt. -""" - -__version__ = '0.5.0'
--- a/Utilities/py3flakes/checker.py Wed Jan 15 19:05:51 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,680 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> -# -# Original (c) 2005-2010 Divmod, Inc. -# -# This module is based on pyflakes for Python2 but was heavily hacked to -# work with Python3 and eric5 - -import builtins -import os.path -import ast - -from . import messages - - -class Binding(object): - """ - Represents the binding of a value to a name. - - The checker uses this to keep track of which names have been bound and - which names have not. See Assignment for a special type of binding that - is checked with stricter rules. - """ - def __init__(self, name, source): - self.name = name - self.source = source - self.used = False - - def __str__(self): - return self.name - - def __repr__(self): - return '<{0} object {1!r} from line {2!r} at 0x{3:x}>'.format( - self.__class__.__name__, - self.name, - self.source.lineno, - id(self)) - - -class UnBinding(Binding): - ''' - Created by the 'del' operator. - ''' - pass - - -class Importation(Binding): - """ - A binding created by an import statement. - """ - def __init__(self, name, source): - self.fullName = name - name = name.split('.')[0] - super(Importation, self).__init__(name, source) - - -class Argument(Binding): - """ - Represents binding a name as an argument. - """ - pass - - -class Assignment(Binding): - """ - Represents binding a name with an explicit assignment. - - The checker will raise warnings for any Assignment that isn't used. Also, - the checker does not consider assignments in tuple/list unpacking to be - Assignments, rather it treats them as simple Bindings. - """ - pass - - -class FunctionDefinition(Binding): - """ - Represents a function definition. - """ - is_property = False - - -class ExportBinding(Binding): - """ - A binding created by an __all__ assignment. If the names in the list - can be determined statically, they will be treated as names for export and - additional checking applied to them. - - The only __all__ assignment that can be recognized is one which takes - the value of a literal list containing literal strings. For example:: - - __all__ = ["foo", "bar"] - - Names which are imported and not otherwise used but appear in the value of - __all__ will not have an unused import warning reported for them. - """ - def names(self): - """ - Return a list of the names referenced by this binding. - """ - names = [] - if isinstance(self.source, ast.List): - for node in self.source.elts: - if isinstance(node, (ast.Str, ast.Bytes)): - names.append(node.s) - elif isinstance(node, ast.Num): - names.append(node.n) - return names - - -class Scope(dict): - """ - Class defining the scope base class. - """ - importStarred = False # set to True when import * is found - - def __repr__(self): - return '<{0} at 0x{1:x} {2}>'.format( - self.__class__.__name__, id(self), dict.__repr__(self)) - - def __init__(self): - super(Scope, self).__init__() - - -class ClassScope(Scope): - """ - Class representing a name scope for a class. - """ - pass - - -class FunctionScope(Scope): - """ - Class representing a name scope for a function. - """ - def __init__(self): - super(FunctionScope, self).__init__() - self.globals = {} - - -class ModuleScope(Scope): - """ - Class representing a name scope for a module. - """ - pass - -# Globally defined names which are not attributes of the builtins module. -_MAGIC_GLOBALS = ['__file__', '__builtins__'] - - -class Checker(object): - """ - Class to check the cleanliness and sanity of Python code. - """ - nodeDepth = 0 - traceTree = False - - def __init__(self, module, filename='(none)'): - """ - Constructor - - @param module parsed module tree or module source code - @param filename name of the module file (string) - """ - self._deferredFunctions = [] - self._deferredAssignments = [] - self.dead_scopes = [] - self.messages = [] - self.filename = filename - self.scopeStack = [ModuleScope()] - self.futuresAllowed = True - - if isinstance(module, str): - module = ast.parse(module, filename, "exec") - self.handleBody(module) - self._runDeferred(self._deferredFunctions) - # Set _deferredFunctions to None so that deferFunction will fail - # noisily if called after we've run through the deferred functions. - self._deferredFunctions = None - self._runDeferred(self._deferredAssignments) - # Set _deferredAssignments to None so that deferAssignment will fail - # noisly if called after we've run through the deferred assignments. - self._deferredAssignments = None - del self.scopeStack[1:] - self.popScope() - self.check_dead_scopes() - - def deferFunction(self, callable): - ''' - Schedule a function handler to be called just before completion. - - This is used for handling function bodies, which must be deferred - because code later in the file might modify the global scope. When - `callable` is called, the scope at the time this is called will be - restored, however it will contain any new bindings added to it. - ''' - self._deferredFunctions.append((callable, self.scopeStack[:])) - - def deferAssignment(self, callable): - """ - Schedule an assignment handler to be called just after deferred - function handlers. - """ - self._deferredAssignments.append((callable, self.scopeStack[:])) - - def _runDeferred(self, deferred): - """ - Run the callables in deferred using their associated scope stack. - """ - for handler, scope in deferred: - self.scopeStack = scope - handler() - - def scope(self): - return self.scopeStack[-1] - scope = property(scope) - - def popScope(self): - self.dead_scopes.append(self.scopeStack.pop()) - - def check_dead_scopes(self): - """ - Look at scopes which have been fully examined and report names in them - which were imported but unused. - """ - for scope in self.dead_scopes: - export = isinstance(scope.get('__all__'), ExportBinding) - if export: - all = scope['__all__'].names() - if os.path.split(self.filename)[1] != '__init__.py': - # Look for possible mistakes in the export list - undefined = set(all) - set(scope) - for name in undefined: - self.report( - messages.UndefinedExport, - scope['__all__'].source.lineno, - name) - else: - all = [] - - # Look for imported names that aren't used. - for importation in scope.values(): - if isinstance(importation, Importation): - if not importation.used and importation.name not in all: - self.report( - messages.UnusedImport, - importation.source.lineno, - importation.name) - - def pushFunctionScope(self): - self.scopeStack.append(FunctionScope()) - - def pushClassScope(self): - self.scopeStack.append(ClassScope()) - - def report(self, messageClass, *args, **kwargs): - self.messages.append(messageClass(self.filename, *args, **kwargs)) - - def handleBody(self, tree): - for node in tree.body: - self.handleNode(node, tree) - - def handleChildren(self, tree): - for node in ast.iter_child_nodes(tree): - self.handleNode(node, tree) - - def isDocstring(self, node): - """ - Determine if the given node is a docstring, as long as it is at the - correct place in the node tree. - """ - return isinstance(node, ast.Str) or \ - (isinstance(node, ast.Expr) and - isinstance(node.value, ast.Str)) - - def handleNode(self, node, parent): - if node: - node.parent = parent - if self.traceTree: - print(' ' * self.nodeDepth + node.__class__.__name__) - self.nodeDepth += 1 - if self.futuresAllowed and \ - not (isinstance(node, ast.ImportFrom) or - self.isDocstring(node)): - self.futuresAllowed = False - nodeType = node.__class__.__name__.upper() - try: - handler = getattr(self, nodeType) - handler(node) - except AttributeError: - print(nodeType, "not supported yet. Please report this.") - finally: - self.nodeDepth -= 1 - if self.traceTree: - print(' ' * self.nodeDepth + 'end ' + node.__class__.__name__) - - def ignore(self, node): - pass - - # ast nodes to be ignored - PASS = CONTINUE = BREAK = ELLIPSIS = NUM = STR = BYTES = \ - LOAD = STORE = DEL = AUGLOAD = AUGSTORE = PARAM = \ - ATTRIBUTES = AND = OR = ADD = SUB = MULT = DIV = \ - MOD = POW = LSHIFT = RSHIFT = BITOR = BITXOR = BITAND = FLOORDIV = \ - INVERT = NOT = UADD = USUB = EQ = NOTEQ = LT = LTE = GT = GTE = IS = \ - ISNOT = IN = NOTIN = ignore - - # "stmt" type nodes - RETURN = DELETE = PRINT = WHILE = IF = WITH = WITHITEM = RAISE = \ - TRY = TRYEXCEPT = TRYFINALLY = ASSERT = EXEC = EXPR = handleChildren - - # "expr" type nodes - BOOLOP = BINOP = UNARYOP = IFEXP = DICT = SET = YIELD = COMPARE = \ - CALL = REPR = ATTRIBUTE = SUBSCRIPT = LIST = TUPLE = handleChildren - - # "slice" type nodes - SLICE = EXTSLICE = INDEX = handleChildren - - # additional node types - COMPREHENSION = KEYWORD = handleChildren - - def addBinding(self, lineno, value, reportRedef=True): - ''' - Called when a binding is altered. - - @param lineno line of the statement responsible for the change - (integer) - @param value the optional new value, a Binding instance, associated - with the binding; if None, the binding is deleted if it exists - @param reportRedef flag indicating if rebinding while unused will be - reported (boolean) - ''' - if (isinstance(self.scope.get(value.name), FunctionDefinition) - and isinstance(value, FunctionDefinition) - and not self.scope.get(value.name).is_property - and not value.is_property): - self.report(messages.RedefinedFunction, - lineno, value.name, - self.scope[value.name].source.lineno) - - if not isinstance(self.scope, ClassScope): - for scope in self.scopeStack[::-1]: - existing = scope.get(value.name) - if isinstance(existing, Importation) and \ - not existing.used and \ - not isinstance(value, UnBinding) and \ - (not isinstance(value, Importation) or \ - value.fullName == existing.fullName) and \ - reportRedef: - self.report(messages.RedefinedWhileUnused, - lineno, value.name, - scope[value.name].source.lineno) - - if isinstance(value, UnBinding): - try: - del self.scope[value.name] - except KeyError: - self.report(messages.UndefinedName, lineno, value.name) - else: - self.scope[value.name] = value - - ############################################################ - ## individual handler methods below - ############################################################ - - def GLOBAL(self, node): - """ - Keep track of globals declarations. - """ - if isinstance(self.scope, FunctionScope): - self.scope.globals.update(dict.fromkeys(node.names)) - - NONLOCAL = GLOBAL - - def LISTCOMP(self, node): - for generator in node.generators: - self.handleNode(generator, node) - self.handleNode(node.elt, node) - - SETCOMP = GENERATOREXP = LISTCOMP - - def DICTCOMP(self, node): - for generator in node.generators: - self.handleNode(generator, node) - self.handleNode(node.key, node) - self.handleNode(node.value, node) - - def FOR(self, node): - """ - Process bindings for loop variables. - """ - vars = [] - - def collectLoopVars(n): - if isinstance(n, ast.Name): - vars.append(n.id) - elif isinstance(n, ast.expr_context): - return - else: - for c in ast.iter_child_nodes(n): - collectLoopVars(c) - - collectLoopVars(node.target) - for varn in vars: - if (isinstance(self.scope.get(varn), Importation) - # unused ones will get an unused import warning - and self.scope[varn].used): - self.report(messages.ImportShadowedByLoopVar, - node.lineno, varn, self.scope[varn].source.lineno) - - self.handleChildren(node) - - def NAME(self, node): - """ - Handle occurrence of Name (which can be a load/store/delete access.) - """ - # Locate the name in locals / function / globals scopes. - if isinstance(node.ctx, (ast.Load, ast.AugLoad)): - # try local scope - importStarred = self.scope.importStarred - try: - self.scope[node.id].used = (self.scope, node.lineno) - except KeyError: - pass - else: - return - - # try enclosing function scopes - for scope in self.scopeStack[-2:0:-1]: - importStarred = importStarred or scope.importStarred - if not isinstance(scope, FunctionScope): - continue - try: - scope[node.id].used = (self.scope, node.lineno) - except KeyError: - pass - else: - return - - # try global scope - importStarred = importStarred or self.scopeStack[0].importStarred - try: - self.scopeStack[0][node.id].used = (self.scope, node.lineno) - except KeyError: - if ((not hasattr(builtins, node.id)) - and node.id not in _MAGIC_GLOBALS - and not importStarred): - if (os.path.basename(self.filename) == '__init__.py' and - node.id == '__path__'): - # the special name __path__ is valid only in packages - pass - else: - self.report(messages.UndefinedName, - node.lineno, node.id) - elif isinstance(node.ctx, (ast.Store, ast.AugStore)): - # if the name hasn't already been defined in the current scope - if isinstance(self.scope, FunctionScope) and \ - node.id not in self.scope: - # for each function or module scope above us - for scope in self.scopeStack[:-1]: - if not isinstance(scope, (FunctionScope, ModuleScope)): - continue - # if the name was defined in that scope, and the name has - # been accessed already in the current scope, and hasn't - # been declared global - if (node.id in scope - and scope[node.id].used - and scope[node.id].used[0] is self.scope - and node.id not in self.scope.globals): - # then it's probably a mistake - self.report(messages.UndefinedLocal, - scope[node.id].used[1], - node.id, - scope[node.id].source.lineno) - break - - if isinstance(node.parent, - (ast.For, ast.comprehension, ast.Tuple, ast.List)): - binding = Binding(node.id, node) - elif (node.id == '__all__' and - isinstance(self.scope, ModuleScope)): - binding = ExportBinding(node.id, node.parent.value) - else: - binding = Assignment(node.id, node) - if node.id in self.scope: - binding.used = self.scope[node.id].used - self.addBinding(node.lineno, binding) - elif isinstance(node.ctx, ast.Del): - if isinstance(self.scope, FunctionScope) and \ - node.id in self.scope.globals: - del self.scope.globals[node.id] - else: - self.addBinding(node.lineno, UnBinding(node.id, node)) - else: - # must be a Param context -- this only happens for names in - # function arguments, but these aren't dispatched through here - raise RuntimeError( - "Got impossible expression context: {0:r}".format(node.ctx,)) - - def FUNCTIONDEF(self, node): - is_property = False - if hasattr(node, "decorator_list"): - for decorator in node.decorator_list: - self.handleNode(decorator, node) - if getattr(decorator, 'id', None) == 'property': - is_property = True - if getattr(decorator, 'attr', None) in ('setter', 'deleter'): - is_property = True - funcdef = FunctionDefinition(node.name, node) - funcdef.is_property = is_property - self.addBinding(node.lineno, funcdef) - self.LAMBDA(node) - - def LAMBDA(self, node): - for default in node.args.defaults + node.args.kw_defaults: - self.handleNode(default, node) - - def runFunction(): - args = [] - - def addArgs(arglist): - for arg in arglist: - if isinstance(arg.arg, tuple): - addArgs(arg.arg) - else: - if arg.arg in args: - self.report(messages.DuplicateArgument, - node.lineno, arg.arg) - args.append(arg.arg) - - def checkUnusedAssignments(): - """ - Check to see if any assignments have not been used. - """ - for name, binding in self.scope.items(): - if (not binding.used and not name in self.scope.globals - and isinstance(binding, Assignment)): - self.report(messages.UnusedVariable, - binding.source.lineno, name) - - self.pushFunctionScope() - addArgs(node.args.args) - addArgs(node.args.kwonlyargs) - # vararg/kwarg identifiers are not Name nodes - if node.args.vararg: - args.append(node.args.vararg) - if node.args.kwarg: - args.append(node.args.kwarg) - for name in args: - self.addBinding(node.lineno, Argument(name, node), - reportRedef=False) - if isinstance(node.body, list): - self.handleBody(node) - else: - self.handleNode(node.body, node) - self.deferAssignment(checkUnusedAssignments) - self.popScope() - - self.deferFunction(runFunction) - - def CLASSDEF(self, node): - """ - Check names used in a class definition, including its decorators, base - classes, and the body of its definition. Additionally, add its name to - the current scope. - """ - for decorator in getattr(node, "decorator_list", []): - self.handleNode(decorator, node) - for baseNode in node.bases: - self.handleNode(baseNode, node) - self.addBinding(node.lineno, Binding(node.name, node)) - self.pushClassScope() - self.handleBody(node) - self.popScope() - - def handleAssignName(self, node): - # special handling for ast.Subscript and ast.Starred - if isinstance(node, (ast.Subscript, ast.Starred)): - node.value.parent = node - self.handleAssignName(node.value) - if isinstance(node, ast.Subscript): - if isinstance(node.slice, ast.Slice): - self.handleNode(node.slice.lower, node) - self.handleNode(node.slice.upper, node) - else: - self.handleNode(node.slice.value, node) - return - - # if the name hasn't already been defined in the current scope - if isinstance(node, (ast.Tuple, ast.List)): - for elt in node.elts: - elt.parent = node - self.handleAssignName(elt) - return - - if isinstance(node, ast.Attribute): - self.handleNode(node.value, node) - return - - if isinstance(self.scope, FunctionScope) and node.id not in self.scope: - # for each function or module scope above us - for scope in self.scopeStack[:-1]: - if not isinstance(scope, (FunctionScope, ModuleScope)): - continue - # if the name was defined in that scope, and the name has - # been accessed already in the current scope, and hasn't - # been declared global - if (node.id in scope - and scope[node.id].used - and scope[node.id].used[0] is self.scope - and node.id not in self.scope.globals): - # then it's probably a mistake - self.report(messages.UndefinedLocal, - scope[node.id].used[1], - node.id, - scope[node.id].source.lineno) - break - - if isinstance(node.parent, - (ast.For, ast.ListComp, ast.GeneratorExp, - ast.Tuple, ast.List)): - binding = Binding(node.id, node) - elif (node.id == '__all__' and - isinstance(self.scope, ModuleScope) and - isinstance(node.parent, ast.Assign)): - binding = ExportBinding(node.id, node.parent.value) - else: - binding = Assignment(node.id, node) - if node.id in self.scope: - binding.used = self.scope[node.id].used - self.addBinding(node.lineno, binding) - - def ASSIGN(self, node): - self.handleNode(node.value, node) - for target in node.targets: - self.handleNode(target, node) - - def AUGASSIGN(self, node): - # AugAssign is awkward: must set the context explicitly and - # visit twice, once with AugLoad context, once with AugStore context - node.target.ctx = ast.AugLoad() - self.handleNode(node.target, node) - self.handleNode(node.value, node) - node.target.ctx = ast.AugStore() - self.handleNode(node.target, node) - - def IMPORT(self, node): - for alias in node.names: - name = alias.asname or alias.name - importation = Importation(name, node) - self.addBinding(node.lineno, importation) - - def IMPORTFROM(self, node): - if node.module == '__future__': - if not self.futuresAllowed: - self.report(messages.LateFutureImport, node.lineno, - [n.name for n in node.names]) - else: - self.futuresAllowed = False - - for alias in node.names: - if alias.name == '*': - self.scope.importStarred = True - self.report(messages.ImportStarUsed, node.lineno, node.module) - continue - name = alias.asname or alias.name - importation = Importation(name, node) - if node.module == '__future__': - importation.used = (self.scope, node.lineno) - self.addBinding(node.lineno, importation) - - def EXCEPTHANDLER(self, node): - node.type and self.handleNode(node.type, node) - if node.name: - node.id = node.name - self.handleAssignName(node) - self.handleBody(node) - - def STARRED(self, node): - self.handleNode(node.value, node)
--- a/Utilities/py3flakes/messages.py Wed Jan 15 19:05:51 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,266 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> -# -# Original (c) 2005 Divmod, Inc. See LICENSE file for details -# -# This module is based on pyflakes for Python2 but was heavily hacked to -# work with Python3 and Qt (translatable messages) - -""" -Module implementing the messages for py3flakes. -""" - - -class Message(object): - """ - Class defining the base for all specific message classes. - """ - message_id = 'F00' - message = '' - message_args = () - - def __init__(self, filename, lineno): - """ - Constructor - - @param filename name of the file (string) - @param lineno line number (integer) - """ - self.filename = filename - self.lineno = lineno - - def __str__(self): - """ - Special method return a string representation of the instance object. - - @return string representation of the object (string) - """ - return '%s:%s: %s' % ( - self.filename, self.lineno, self.message % self.message_args) - - def getMessageData(self): - """ - Public method to get the individual message data elements. - - @return tuple containing file name, line number, message ID and - message arguments (string, integer, string, list) - """ - return (self.filename, self.lineno, self.message_id, self.message_args) - - -class UnusedImport(Message): - """ - Class defining the "Unused Import" message. - """ - message_id = 'F01' - message = '%r imported but unused' - - def __init__(self, filename, lineno, name): - """ - Constructor - - @param filename name of the file (string) - @param lineno line number (integer) - @param name name of the unused import (string) - """ - Message.__init__(self, filename, lineno) - self.message_args = (name,) - - -class RedefinedWhileUnused(Message): - """ - Class defining the "Redefined While Unused" message. - """ - message_id = 'F02' - message = 'redefinition of unused %r from line %r' - - def __init__(self, filename, lineno, name, orig_lineno): - """ - Constructor - - @param filename name of the file (string) - @param lineno line number (integer) - @param name name of the redefined object (string) - @param orig_lineno line number of the original definition (integer) - """ - Message.__init__(self, filename, lineno) - self.message_args = (name, orig_lineno) - - -class ImportShadowedByLoopVar(Message): - """ - Class defining the "Import Shadowed By Loop Var" message. - """ - message_id = 'F03' - message = 'import %r from line %r shadowed by loop variable' - - def __init__(self, filename, lineno, name, orig_lineno): - """ - Constructor - - @param filename name of the file (string) - @param lineno line number (integer) - @param name name of the shadowed import (string) - @param orig_lineno line number of the import (integer) - """ - Message.__init__(self, filename, lineno) - self.message_args = (name, orig_lineno) - - -class ImportStarUsed(Message): - """ - Class defining the "Import Star Used" message. - """ - message_id = 'F04' - message = "'from %s import *' used; unable to detect undefined names" - - def __init__(self, filename, lineno, modname): - """ - Constructor - - @param filename name of the file (string) - @param lineno line number (integer) - @param modname name of the module imported using star import (string) - """ - Message.__init__(self, filename, lineno) - self.message_args = (modname,) - - -class UndefinedName(Message): - """ - Class defining the "Undefined Name" message. - """ - message_id = 'F05' - message = 'undefined name %r' - - def __init__(self, filename, lineno, name): - """ - Constructor - - @param filename name of the file (string) - @param lineno line number (integer) - @param name undefined name (string) - """ - Message.__init__(self, filename, lineno) - self.message_args = (name,) - - -class UndefinedExport(Message): - """ - Class defining the "Undefined Export" message. - """ - message_id = 'F06' - message = 'undefined name %r in __all__' - - def __init__(self, filename, lineno, name): - """ - Constructor - - @param filename name of the file (string) - @param lineno line number (integer) - @param name undefined exported name (string) - """ - Message.__init__(self, filename, lineno) - self.message_args = (name,) - - -class UndefinedLocal(Message): - """ - Class defining the "Undefined Local Variable" message. - """ - message_id = 'F07' - message = "local variable %r (defined in enclosing scope on line %r)" \ - " referenced before assignment" - - def __init__(self, filename, lineno, name, orig_lineno): - """ - Constructor - - @param filename name of the file (string) - @param lineno line number (integer) - @param name name of the prematurely referenced variable (string) - @param orig_lineno line number of the variable definition (integer) - """ - Message.__init__(self, filename, lineno) - self.message_args = (name, orig_lineno) - - -class DuplicateArgument(Message): - """ - Class defining the "Duplicate Argument" message. - """ - message_id = 'F08' - message = 'duplicate argument %r in function definition' - - def __init__(self, filename, lineno, name): - """ - Constructor - - @param filename name of the file (string) - @param lineno line number (integer) - @param name name of the duplicate argument (string) - """ - Message.__init__(self, filename, lineno) - self.message_args = (name,) - - -class RedefinedFunction(Message): - """ - Class defining the "Redefined Function" message. - """ - message_id = 'F09' - message = 'redefinition of function %r from line %r' - - def __init__(self, filename, lineno, name, orig_lineno): - """ - Constructor - - @param filename name of the file (string) - @param lineno line number (integer) - @param name name of the redefined function (string) - @param orig_lineno line number of the original definition (integer) - """ - Message.__init__(self, filename, lineno) - self.message_args = (name, orig_lineno) - - -class LateFutureImport(Message): - """ - Class defining the "Late Future Import" message. - """ - message_id = 'F10' - message = 'future import(s) %r after other statements' - - def __init__(self, filename, lineno, names): - """ - Constructor - - @param filename name of the file (string) - @param lineno line number (integer) - @param names names of the imported futures (string) - """ - Message.__init__(self, filename, lineno) - self.message_args = (names,) - - -class UnusedVariable(Message): - """ - Class defining the "Unused Variable" message. - - Indicates that a variable has been explicitly assigned to but not actually - used. - """ - message_id = 'F11' - message = 'local variable %r is assigned to but never used' - - def __init__(self, filename, lineno, name): - """ - Constructor - - @param filename name of the file (string) - @param lineno line number (integer) - @param name name of the unused variable (string) - """ - Message.__init__(self, filename, lineno) - self.message_args = (name,)
--- a/Utilities/py3flakes/translations.py Wed Jan 15 19:05:51 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (c) 2014 Detlev Offenbach <detlev@die-offenbachs.de> -# - -""" -Module implementing message translations for pyflakes warning messages. -""" - -from PyQt4.QtCore import QCoreApplication - -__all__ = ["getTranslatedFlakesMessage"] - -_messages = { - 'F01': QCoreApplication.translate( - 'pyFlakes', - '{0!r} imported but unused.'), - 'F02': QCoreApplication.translate( - 'pyFlakes', - 'Redefinition of unused {0!r} from line {1!r}.'), - 'F03': QCoreApplication.translate( - 'pyFlakes', - 'Import {0!r} from line {1!r} shadowed by loop variable.'), - 'F04': QCoreApplication.translate( - 'pyFlakes', - "'from {0} import *' used; unable to detect undefined names."), - 'F05': QCoreApplication.translate( - 'pyFlakes', - 'Undefined name {0!r}.'), - 'F06': QCoreApplication.translate( - 'pyFlakes', - 'Undefined name {0!r} in __all__.'), - 'F07': QCoreApplication.translate( - 'pyFlakes', - "Local variable {0!r} (defined in enclosing scope on line {1!r})" - " referenced before assignment."), - 'F08': QCoreApplication.translate( - 'pyFlakes', - 'Duplicate argument {0!r} in function definition.'), - 'F09': QCoreApplication.translate( - 'pyFlakes', - 'Redefinition of function {0!r} from line {1!r}.'), - 'F10': QCoreApplication.translate( - 'pyFlakes', - 'Future import(s) {0!r} after other statements.'), - 'F11': QCoreApplication.translate( - 'pyFlakes', - 'Local variable {0!r} is assigned to but never used.'), - -} - - -def getTranslatedFlakesMessage(message_id, message_args): - """ - Module function to get a translated and formatted message for a - given pyflakes message ID. - - @param message_id message ID (string) - @param message_args arguments for a formatted message (list) - @return translated and formatted message (string) - """ - if message_id in _messages: - return QCoreApplication.translate( - "pyFlakes", _messages[message_id]).format(*message_args) - else: - return QCoreApplication.translate( - "pyFlakes", "no message defined for code '{0}'")\ - .format(message_id)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Utilities/pyflakes/__init__.py Wed Jan 15 19:16:06 2014 +0100 @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Package containg the pyflakes Python3 port adapted for Qt. +""" + +__version__ = '0.5.0'
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Utilities/pyflakes/checker.py Wed Jan 15 19:16:06 2014 +0100 @@ -0,0 +1,680 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> +# +# Original (c) 2005-2010 Divmod, Inc. +# +# This module is based on pyflakes for Python2 but was heavily hacked to +# work with Python3 and eric5 + +import builtins +import os.path +import ast + +from . import messages + + +class Binding(object): + """ + Represents the binding of a value to a name. + + The checker uses this to keep track of which names have been bound and + which names have not. See Assignment for a special type of binding that + is checked with stricter rules. + """ + def __init__(self, name, source): + self.name = name + self.source = source + self.used = False + + def __str__(self): + return self.name + + def __repr__(self): + return '<{0} object {1!r} from line {2!r} at 0x{3:x}>'.format( + self.__class__.__name__, + self.name, + self.source.lineno, + id(self)) + + +class UnBinding(Binding): + ''' + Created by the 'del' operator. + ''' + pass + + +class Importation(Binding): + """ + A binding created by an import statement. + """ + def __init__(self, name, source): + self.fullName = name + name = name.split('.')[0] + super(Importation, self).__init__(name, source) + + +class Argument(Binding): + """ + Represents binding a name as an argument. + """ + pass + + +class Assignment(Binding): + """ + Represents binding a name with an explicit assignment. + + The checker will raise warnings for any Assignment that isn't used. Also, + the checker does not consider assignments in tuple/list unpacking to be + Assignments, rather it treats them as simple Bindings. + """ + pass + + +class FunctionDefinition(Binding): + """ + Represents a function definition. + """ + is_property = False + + +class ExportBinding(Binding): + """ + A binding created by an __all__ assignment. If the names in the list + can be determined statically, they will be treated as names for export and + additional checking applied to them. + + The only __all__ assignment that can be recognized is one which takes + the value of a literal list containing literal strings. For example:: + + __all__ = ["foo", "bar"] + + Names which are imported and not otherwise used but appear in the value of + __all__ will not have an unused import warning reported for them. + """ + def names(self): + """ + Return a list of the names referenced by this binding. + """ + names = [] + if isinstance(self.source, ast.List): + for node in self.source.elts: + if isinstance(node, (ast.Str, ast.Bytes)): + names.append(node.s) + elif isinstance(node, ast.Num): + names.append(node.n) + return names + + +class Scope(dict): + """ + Class defining the scope base class. + """ + importStarred = False # set to True when import * is found + + def __repr__(self): + return '<{0} at 0x{1:x} {2}>'.format( + self.__class__.__name__, id(self), dict.__repr__(self)) + + def __init__(self): + super(Scope, self).__init__() + + +class ClassScope(Scope): + """ + Class representing a name scope for a class. + """ + pass + + +class FunctionScope(Scope): + """ + Class representing a name scope for a function. + """ + def __init__(self): + super(FunctionScope, self).__init__() + self.globals = {} + + +class ModuleScope(Scope): + """ + Class representing a name scope for a module. + """ + pass + +# Globally defined names which are not attributes of the builtins module. +_MAGIC_GLOBALS = ['__file__', '__builtins__'] + + +class Checker(object): + """ + Class to check the cleanliness and sanity of Python code. + """ + nodeDepth = 0 + traceTree = False + + def __init__(self, module, filename='(none)'): + """ + Constructor + + @param module parsed module tree or module source code + @param filename name of the module file (string) + """ + self._deferredFunctions = [] + self._deferredAssignments = [] + self.dead_scopes = [] + self.messages = [] + self.filename = filename + self.scopeStack = [ModuleScope()] + self.futuresAllowed = True + + if isinstance(module, str): + module = ast.parse(module, filename, "exec") + self.handleBody(module) + self._runDeferred(self._deferredFunctions) + # Set _deferredFunctions to None so that deferFunction will fail + # noisily if called after we've run through the deferred functions. + self._deferredFunctions = None + self._runDeferred(self._deferredAssignments) + # Set _deferredAssignments to None so that deferAssignment will fail + # noisly if called after we've run through the deferred assignments. + self._deferredAssignments = None + del self.scopeStack[1:] + self.popScope() + self.check_dead_scopes() + + def deferFunction(self, callable): + ''' + Schedule a function handler to be called just before completion. + + This is used for handling function bodies, which must be deferred + because code later in the file might modify the global scope. When + `callable` is called, the scope at the time this is called will be + restored, however it will contain any new bindings added to it. + ''' + self._deferredFunctions.append((callable, self.scopeStack[:])) + + def deferAssignment(self, callable): + """ + Schedule an assignment handler to be called just after deferred + function handlers. + """ + self._deferredAssignments.append((callable, self.scopeStack[:])) + + def _runDeferred(self, deferred): + """ + Run the callables in deferred using their associated scope stack. + """ + for handler, scope in deferred: + self.scopeStack = scope + handler() + + def scope(self): + return self.scopeStack[-1] + scope = property(scope) + + def popScope(self): + self.dead_scopes.append(self.scopeStack.pop()) + + def check_dead_scopes(self): + """ + Look at scopes which have been fully examined and report names in them + which were imported but unused. + """ + for scope in self.dead_scopes: + export = isinstance(scope.get('__all__'), ExportBinding) + if export: + all = scope['__all__'].names() + if os.path.split(self.filename)[1] != '__init__.py': + # Look for possible mistakes in the export list + undefined = set(all) - set(scope) + for name in undefined: + self.report( + messages.UndefinedExport, + scope['__all__'].source.lineno, + name) + else: + all = [] + + # Look for imported names that aren't used. + for importation in scope.values(): + if isinstance(importation, Importation): + if not importation.used and importation.name not in all: + self.report( + messages.UnusedImport, + importation.source.lineno, + importation.name) + + def pushFunctionScope(self): + self.scopeStack.append(FunctionScope()) + + def pushClassScope(self): + self.scopeStack.append(ClassScope()) + + def report(self, messageClass, *args, **kwargs): + self.messages.append(messageClass(self.filename, *args, **kwargs)) + + def handleBody(self, tree): + for node in tree.body: + self.handleNode(node, tree) + + def handleChildren(self, tree): + for node in ast.iter_child_nodes(tree): + self.handleNode(node, tree) + + def isDocstring(self, node): + """ + Determine if the given node is a docstring, as long as it is at the + correct place in the node tree. + """ + return isinstance(node, ast.Str) or \ + (isinstance(node, ast.Expr) and + isinstance(node.value, ast.Str)) + + def handleNode(self, node, parent): + if node: + node.parent = parent + if self.traceTree: + print(' ' * self.nodeDepth + node.__class__.__name__) + self.nodeDepth += 1 + if self.futuresAllowed and \ + not (isinstance(node, ast.ImportFrom) or + self.isDocstring(node)): + self.futuresAllowed = False + nodeType = node.__class__.__name__.upper() + try: + handler = getattr(self, nodeType) + handler(node) + except AttributeError: + print(nodeType, "not supported yet. Please report this.") + finally: + self.nodeDepth -= 1 + if self.traceTree: + print(' ' * self.nodeDepth + 'end ' + node.__class__.__name__) + + def ignore(self, node): + pass + + # ast nodes to be ignored + PASS = CONTINUE = BREAK = ELLIPSIS = NUM = STR = BYTES = \ + LOAD = STORE = DEL = AUGLOAD = AUGSTORE = PARAM = \ + ATTRIBUTES = AND = OR = ADD = SUB = MULT = DIV = \ + MOD = POW = LSHIFT = RSHIFT = BITOR = BITXOR = BITAND = FLOORDIV = \ + INVERT = NOT = UADD = USUB = EQ = NOTEQ = LT = LTE = GT = GTE = IS = \ + ISNOT = IN = NOTIN = ignore + + # "stmt" type nodes + RETURN = DELETE = PRINT = WHILE = IF = WITH = WITHITEM = RAISE = \ + TRY = TRYEXCEPT = TRYFINALLY = ASSERT = EXEC = EXPR = handleChildren + + # "expr" type nodes + BOOLOP = BINOP = UNARYOP = IFEXP = DICT = SET = YIELD = COMPARE = \ + CALL = REPR = ATTRIBUTE = SUBSCRIPT = LIST = TUPLE = handleChildren + + # "slice" type nodes + SLICE = EXTSLICE = INDEX = handleChildren + + # additional node types + COMPREHENSION = KEYWORD = handleChildren + + def addBinding(self, lineno, value, reportRedef=True): + ''' + Called when a binding is altered. + + @param lineno line of the statement responsible for the change + (integer) + @param value the optional new value, a Binding instance, associated + with the binding; if None, the binding is deleted if it exists + @param reportRedef flag indicating if rebinding while unused will be + reported (boolean) + ''' + if (isinstance(self.scope.get(value.name), FunctionDefinition) + and isinstance(value, FunctionDefinition) + and not self.scope.get(value.name).is_property + and not value.is_property): + self.report(messages.RedefinedFunction, + lineno, value.name, + self.scope[value.name].source.lineno) + + if not isinstance(self.scope, ClassScope): + for scope in self.scopeStack[::-1]: + existing = scope.get(value.name) + if isinstance(existing, Importation) and \ + not existing.used and \ + not isinstance(value, UnBinding) and \ + (not isinstance(value, Importation) or \ + value.fullName == existing.fullName) and \ + reportRedef: + self.report(messages.RedefinedWhileUnused, + lineno, value.name, + scope[value.name].source.lineno) + + if isinstance(value, UnBinding): + try: + del self.scope[value.name] + except KeyError: + self.report(messages.UndefinedName, lineno, value.name) + else: + self.scope[value.name] = value + + ############################################################ + ## individual handler methods below + ############################################################ + + def GLOBAL(self, node): + """ + Keep track of globals declarations. + """ + if isinstance(self.scope, FunctionScope): + self.scope.globals.update(dict.fromkeys(node.names)) + + NONLOCAL = GLOBAL + + def LISTCOMP(self, node): + for generator in node.generators: + self.handleNode(generator, node) + self.handleNode(node.elt, node) + + SETCOMP = GENERATOREXP = LISTCOMP + + def DICTCOMP(self, node): + for generator in node.generators: + self.handleNode(generator, node) + self.handleNode(node.key, node) + self.handleNode(node.value, node) + + def FOR(self, node): + """ + Process bindings for loop variables. + """ + vars = [] + + def collectLoopVars(n): + if isinstance(n, ast.Name): + vars.append(n.id) + elif isinstance(n, ast.expr_context): + return + else: + for c in ast.iter_child_nodes(n): + collectLoopVars(c) + + collectLoopVars(node.target) + for varn in vars: + if (isinstance(self.scope.get(varn), Importation) + # unused ones will get an unused import warning + and self.scope[varn].used): + self.report(messages.ImportShadowedByLoopVar, + node.lineno, varn, self.scope[varn].source.lineno) + + self.handleChildren(node) + + def NAME(self, node): + """ + Handle occurrence of Name (which can be a load/store/delete access.) + """ + # Locate the name in locals / function / globals scopes. + if isinstance(node.ctx, (ast.Load, ast.AugLoad)): + # try local scope + importStarred = self.scope.importStarred + try: + self.scope[node.id].used = (self.scope, node.lineno) + except KeyError: + pass + else: + return + + # try enclosing function scopes + for scope in self.scopeStack[-2:0:-1]: + importStarred = importStarred or scope.importStarred + if not isinstance(scope, FunctionScope): + continue + try: + scope[node.id].used = (self.scope, node.lineno) + except KeyError: + pass + else: + return + + # try global scope + importStarred = importStarred or self.scopeStack[0].importStarred + try: + self.scopeStack[0][node.id].used = (self.scope, node.lineno) + except KeyError: + if ((not hasattr(builtins, node.id)) + and node.id not in _MAGIC_GLOBALS + and not importStarred): + if (os.path.basename(self.filename) == '__init__.py' and + node.id == '__path__'): + # the special name __path__ is valid only in packages + pass + else: + self.report(messages.UndefinedName, + node.lineno, node.id) + elif isinstance(node.ctx, (ast.Store, ast.AugStore)): + # if the name hasn't already been defined in the current scope + if isinstance(self.scope, FunctionScope) and \ + node.id not in self.scope: + # for each function or module scope above us + for scope in self.scopeStack[:-1]: + if not isinstance(scope, (FunctionScope, ModuleScope)): + continue + # if the name was defined in that scope, and the name has + # been accessed already in the current scope, and hasn't + # been declared global + if (node.id in scope + and scope[node.id].used + and scope[node.id].used[0] is self.scope + and node.id not in self.scope.globals): + # then it's probably a mistake + self.report(messages.UndefinedLocal, + scope[node.id].used[1], + node.id, + scope[node.id].source.lineno) + break + + if isinstance(node.parent, + (ast.For, ast.comprehension, ast.Tuple, ast.List)): + binding = Binding(node.id, node) + elif (node.id == '__all__' and + isinstance(self.scope, ModuleScope)): + binding = ExportBinding(node.id, node.parent.value) + else: + binding = Assignment(node.id, node) + if node.id in self.scope: + binding.used = self.scope[node.id].used + self.addBinding(node.lineno, binding) + elif isinstance(node.ctx, ast.Del): + if isinstance(self.scope, FunctionScope) and \ + node.id in self.scope.globals: + del self.scope.globals[node.id] + else: + self.addBinding(node.lineno, UnBinding(node.id, node)) + else: + # must be a Param context -- this only happens for names in + # function arguments, but these aren't dispatched through here + raise RuntimeError( + "Got impossible expression context: {0:r}".format(node.ctx,)) + + def FUNCTIONDEF(self, node): + is_property = False + if hasattr(node, "decorator_list"): + for decorator in node.decorator_list: + self.handleNode(decorator, node) + if getattr(decorator, 'id', None) == 'property': + is_property = True + if getattr(decorator, 'attr', None) in ('setter', 'deleter'): + is_property = True + funcdef = FunctionDefinition(node.name, node) + funcdef.is_property = is_property + self.addBinding(node.lineno, funcdef) + self.LAMBDA(node) + + def LAMBDA(self, node): + for default in node.args.defaults + node.args.kw_defaults: + self.handleNode(default, node) + + def runFunction(): + args = [] + + def addArgs(arglist): + for arg in arglist: + if isinstance(arg.arg, tuple): + addArgs(arg.arg) + else: + if arg.arg in args: + self.report(messages.DuplicateArgument, + node.lineno, arg.arg) + args.append(arg.arg) + + def checkUnusedAssignments(): + """ + Check to see if any assignments have not been used. + """ + for name, binding in self.scope.items(): + if (not binding.used and not name in self.scope.globals + and isinstance(binding, Assignment)): + self.report(messages.UnusedVariable, + binding.source.lineno, name) + + self.pushFunctionScope() + addArgs(node.args.args) + addArgs(node.args.kwonlyargs) + # vararg/kwarg identifiers are not Name nodes + if node.args.vararg: + args.append(node.args.vararg) + if node.args.kwarg: + args.append(node.args.kwarg) + for name in args: + self.addBinding(node.lineno, Argument(name, node), + reportRedef=False) + if isinstance(node.body, list): + self.handleBody(node) + else: + self.handleNode(node.body, node) + self.deferAssignment(checkUnusedAssignments) + self.popScope() + + self.deferFunction(runFunction) + + def CLASSDEF(self, node): + """ + Check names used in a class definition, including its decorators, base + classes, and the body of its definition. Additionally, add its name to + the current scope. + """ + for decorator in getattr(node, "decorator_list", []): + self.handleNode(decorator, node) + for baseNode in node.bases: + self.handleNode(baseNode, node) + self.addBinding(node.lineno, Binding(node.name, node)) + self.pushClassScope() + self.handleBody(node) + self.popScope() + + def handleAssignName(self, node): + # special handling for ast.Subscript and ast.Starred + if isinstance(node, (ast.Subscript, ast.Starred)): + node.value.parent = node + self.handleAssignName(node.value) + if isinstance(node, ast.Subscript): + if isinstance(node.slice, ast.Slice): + self.handleNode(node.slice.lower, node) + self.handleNode(node.slice.upper, node) + else: + self.handleNode(node.slice.value, node) + return + + # if the name hasn't already been defined in the current scope + if isinstance(node, (ast.Tuple, ast.List)): + for elt in node.elts: + elt.parent = node + self.handleAssignName(elt) + return + + if isinstance(node, ast.Attribute): + self.handleNode(node.value, node) + return + + if isinstance(self.scope, FunctionScope) and node.id not in self.scope: + # for each function or module scope above us + for scope in self.scopeStack[:-1]: + if not isinstance(scope, (FunctionScope, ModuleScope)): + continue + # if the name was defined in that scope, and the name has + # been accessed already in the current scope, and hasn't + # been declared global + if (node.id in scope + and scope[node.id].used + and scope[node.id].used[0] is self.scope + and node.id not in self.scope.globals): + # then it's probably a mistake + self.report(messages.UndefinedLocal, + scope[node.id].used[1], + node.id, + scope[node.id].source.lineno) + break + + if isinstance(node.parent, + (ast.For, ast.ListComp, ast.GeneratorExp, + ast.Tuple, ast.List)): + binding = Binding(node.id, node) + elif (node.id == '__all__' and + isinstance(self.scope, ModuleScope) and + isinstance(node.parent, ast.Assign)): + binding = ExportBinding(node.id, node.parent.value) + else: + binding = Assignment(node.id, node) + if node.id in self.scope: + binding.used = self.scope[node.id].used + self.addBinding(node.lineno, binding) + + def ASSIGN(self, node): + self.handleNode(node.value, node) + for target in node.targets: + self.handleNode(target, node) + + def AUGASSIGN(self, node): + # AugAssign is awkward: must set the context explicitly and + # visit twice, once with AugLoad context, once with AugStore context + node.target.ctx = ast.AugLoad() + self.handleNode(node.target, node) + self.handleNode(node.value, node) + node.target.ctx = ast.AugStore() + self.handleNode(node.target, node) + + def IMPORT(self, node): + for alias in node.names: + name = alias.asname or alias.name + importation = Importation(name, node) + self.addBinding(node.lineno, importation) + + def IMPORTFROM(self, node): + if node.module == '__future__': + if not self.futuresAllowed: + self.report(messages.LateFutureImport, node.lineno, + [n.name for n in node.names]) + else: + self.futuresAllowed = False + + for alias in node.names: + if alias.name == '*': + self.scope.importStarred = True + self.report(messages.ImportStarUsed, node.lineno, node.module) + continue + name = alias.asname or alias.name + importation = Importation(name, node) + if node.module == '__future__': + importation.used = (self.scope, node.lineno) + self.addBinding(node.lineno, importation) + + def EXCEPTHANDLER(self, node): + node.type and self.handleNode(node.type, node) + if node.name: + node.id = node.name + self.handleAssignName(node) + self.handleBody(node) + + def STARRED(self, node): + self.handleNode(node.value, node)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Utilities/pyflakes/messages.py Wed Jan 15 19:16:06 2014 +0100 @@ -0,0 +1,266 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> +# +# Original (c) 2005 Divmod, Inc. See LICENSE file for details +# +# This module is based on pyflakes for Python2 but was heavily hacked to +# work with Python3 and Qt (translatable messages) + +""" +Module implementing the messages for pyflakes. +""" + + +class Message(object): + """ + Class defining the base for all specific message classes. + """ + message_id = 'F00' + message = '' + message_args = () + + def __init__(self, filename, lineno): + """ + Constructor + + @param filename name of the file (string) + @param lineno line number (integer) + """ + self.filename = filename + self.lineno = lineno + + def __str__(self): + """ + Special method return a string representation of the instance object. + + @return string representation of the object (string) + """ + return '%s:%s: %s' % ( + self.filename, self.lineno, self.message % self.message_args) + + def getMessageData(self): + """ + Public method to get the individual message data elements. + + @return tuple containing file name, line number, message ID and + message arguments (string, integer, string, list) + """ + return (self.filename, self.lineno, self.message_id, self.message_args) + + +class UnusedImport(Message): + """ + Class defining the "Unused Import" message. + """ + message_id = 'F01' + message = '%r imported but unused' + + def __init__(self, filename, lineno, name): + """ + Constructor + + @param filename name of the file (string) + @param lineno line number (integer) + @param name name of the unused import (string) + """ + Message.__init__(self, filename, lineno) + self.message_args = (name,) + + +class RedefinedWhileUnused(Message): + """ + Class defining the "Redefined While Unused" message. + """ + message_id = 'F02' + message = 'redefinition of unused %r from line %r' + + def __init__(self, filename, lineno, name, orig_lineno): + """ + Constructor + + @param filename name of the file (string) + @param lineno line number (integer) + @param name name of the redefined object (string) + @param orig_lineno line number of the original definition (integer) + """ + Message.__init__(self, filename, lineno) + self.message_args = (name, orig_lineno) + + +class ImportShadowedByLoopVar(Message): + """ + Class defining the "Import Shadowed By Loop Var" message. + """ + message_id = 'F03' + message = 'import %r from line %r shadowed by loop variable' + + def __init__(self, filename, lineno, name, orig_lineno): + """ + Constructor + + @param filename name of the file (string) + @param lineno line number (integer) + @param name name of the shadowed import (string) + @param orig_lineno line number of the import (integer) + """ + Message.__init__(self, filename, lineno) + self.message_args = (name, orig_lineno) + + +class ImportStarUsed(Message): + """ + Class defining the "Import Star Used" message. + """ + message_id = 'F04' + message = "'from %s import *' used; unable to detect undefined names" + + def __init__(self, filename, lineno, modname): + """ + Constructor + + @param filename name of the file (string) + @param lineno line number (integer) + @param modname name of the module imported using star import (string) + """ + Message.__init__(self, filename, lineno) + self.message_args = (modname,) + + +class UndefinedName(Message): + """ + Class defining the "Undefined Name" message. + """ + message_id = 'F05' + message = 'undefined name %r' + + def __init__(self, filename, lineno, name): + """ + Constructor + + @param filename name of the file (string) + @param lineno line number (integer) + @param name undefined name (string) + """ + Message.__init__(self, filename, lineno) + self.message_args = (name,) + + +class UndefinedExport(Message): + """ + Class defining the "Undefined Export" message. + """ + message_id = 'F06' + message = 'undefined name %r in __all__' + + def __init__(self, filename, lineno, name): + """ + Constructor + + @param filename name of the file (string) + @param lineno line number (integer) + @param name undefined exported name (string) + """ + Message.__init__(self, filename, lineno) + self.message_args = (name,) + + +class UndefinedLocal(Message): + """ + Class defining the "Undefined Local Variable" message. + """ + message_id = 'F07' + message = "local variable %r (defined in enclosing scope on line %r)" \ + " referenced before assignment" + + def __init__(self, filename, lineno, name, orig_lineno): + """ + Constructor + + @param filename name of the file (string) + @param lineno line number (integer) + @param name name of the prematurely referenced variable (string) + @param orig_lineno line number of the variable definition (integer) + """ + Message.__init__(self, filename, lineno) + self.message_args = (name, orig_lineno) + + +class DuplicateArgument(Message): + """ + Class defining the "Duplicate Argument" message. + """ + message_id = 'F08' + message = 'duplicate argument %r in function definition' + + def __init__(self, filename, lineno, name): + """ + Constructor + + @param filename name of the file (string) + @param lineno line number (integer) + @param name name of the duplicate argument (string) + """ + Message.__init__(self, filename, lineno) + self.message_args = (name,) + + +class RedefinedFunction(Message): + """ + Class defining the "Redefined Function" message. + """ + message_id = 'F09' + message = 'redefinition of function %r from line %r' + + def __init__(self, filename, lineno, name, orig_lineno): + """ + Constructor + + @param filename name of the file (string) + @param lineno line number (integer) + @param name name of the redefined function (string) + @param orig_lineno line number of the original definition (integer) + """ + Message.__init__(self, filename, lineno) + self.message_args = (name, orig_lineno) + + +class LateFutureImport(Message): + """ + Class defining the "Late Future Import" message. + """ + message_id = 'F10' + message = 'future import(s) %r after other statements' + + def __init__(self, filename, lineno, names): + """ + Constructor + + @param filename name of the file (string) + @param lineno line number (integer) + @param names names of the imported futures (string) + """ + Message.__init__(self, filename, lineno) + self.message_args = (names,) + + +class UnusedVariable(Message): + """ + Class defining the "Unused Variable" message. + + Indicates that a variable has been explicitly assigned to but not actually + used. + """ + message_id = 'F11' + message = 'local variable %r is assigned to but never used' + + def __init__(self, filename, lineno, name): + """ + Constructor + + @param filename name of the file (string) + @param lineno line number (integer) + @param name name of the unused variable (string) + """ + Message.__init__(self, filename, lineno) + self.message_args = (name,)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Utilities/pyflakes/translations.py Wed Jan 15 19:16:06 2014 +0100 @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2014 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing message translations for pyflakes warning messages. +""" + +from PyQt4.QtCore import QCoreApplication + +__all__ = ["getTranslatedFlakesMessage"] + +_messages = { + 'F01': QCoreApplication.translate( + 'pyFlakes', + '{0!r} imported but unused.'), + 'F02': QCoreApplication.translate( + 'pyFlakes', + 'Redefinition of unused {0!r} from line {1!r}.'), + 'F03': QCoreApplication.translate( + 'pyFlakes', + 'Import {0!r} from line {1!r} shadowed by loop variable.'), + 'F04': QCoreApplication.translate( + 'pyFlakes', + "'from {0} import *' used; unable to detect undefined names."), + 'F05': QCoreApplication.translate( + 'pyFlakes', + 'Undefined name {0!r}.'), + 'F06': QCoreApplication.translate( + 'pyFlakes', + 'Undefined name {0!r} in __all__.'), + 'F07': QCoreApplication.translate( + 'pyFlakes', + "Local variable {0!r} (defined in enclosing scope on line {1!r})" + " referenced before assignment."), + 'F08': QCoreApplication.translate( + 'pyFlakes', + 'Duplicate argument {0!r} in function definition.'), + 'F09': QCoreApplication.translate( + 'pyFlakes', + 'Redefinition of function {0!r} from line {1!r}.'), + 'F10': QCoreApplication.translate( + 'pyFlakes', + 'Future import(s) {0!r} after other statements.'), + 'F11': QCoreApplication.translate( + 'pyFlakes', + 'Local variable {0!r} is assigned to but never used.'), + +} + + +def getTranslatedFlakesMessage(message_id, message_args): + """ + Module function to get a translated and formatted message for a + given pyflakes message ID. + + @param message_id message ID (string) + @param message_args arguments for a formatted message (list) + @return translated and formatted message (string) + """ + if message_id in _messages: + return QCoreApplication.translate( + "pyFlakes", _messages[message_id]).format(*message_args) + else: + return QCoreApplication.translate( + "pyFlakes", "no message defined for code '{0}'")\ + .format(message_id)
--- a/ViewManager/ViewManager.py Wed Jan 15 19:05:51 2014 +0100 +++ b/ViewManager/ViewManager.py Wed Jan 15 19:16:06 2014 +0100 @@ -3762,7 +3762,7 @@ 'ViewManager', """<b>Next warning message</b>""" """<p>Go to next line of the current editor""" - """ having a py3flakes warning.</p>""" + """ having a pyflakes warning.</p>""" )) self.warningsNextAct.triggered[()].connect(self.__nextWarning) self.bookmarkActions.append(self.warningsNextAct) @@ -3780,7 +3780,7 @@ 'ViewManager', """<b>Previous warning message</b>""" """<p>Go to previous line of the current editor""" - """ having a py3flakes warning.</p>""" + """ having a pyflakes warning.</p>""" )) self.warningsPreviousAct.triggered[()].connect(self.__previousWarning) self.bookmarkActions.append(self.warningsPreviousAct) @@ -3795,7 +3795,7 @@ self.warningsClearAct.setWhatsThis(QApplication.translate( 'ViewManager', """<b>Clear Warning Messages</b>""" - """<p>Clear py3flakes warning messages of all editors.</p>""" + """<p>Clear pyflakes warning messages of all editors.</p>""" )) self.warningsClearAct.triggered[()].connect(self.__clearAllWarnings) self.bookmarkActions.append(self.warningsClearAct)
--- a/eric5.e4p Wed Jan 15 19:05:51 2014 +0100 +++ b/eric5.e4p Wed Jan 15 19:16:06 2014 +0100 @@ -702,9 +702,6 @@ <Source>E5Gui/E5ToolBox.py</Source> <Source>E5Gui/E5TreeSortFilterProxyModel.py</Source> <Source>E5Gui/E5TreeView.py</Source> - <Source>Utilities/py3flakes/__init__.py</Source> - <Source>Utilities/py3flakes/checker.py</Source> - <Source>Utilities/py3flakes/messages.py</Source> <Source>Preferences/ConfigurationPages/EditorKeywordsPage.py</Source> <Source>Cooperation/__init__.py</Source> <Source>Cooperation/Connection.py</Source> @@ -1110,7 +1107,10 @@ <Source>Helpviewer/OpenSearch/DefaultSearchEngines/DefaultSearchEngines_rc.py</Source> <Source>Helpviewer/UserAgent/UserAgentDefaults_rc.py</Source> <Source>E5Gui/E5ProgressDialog.py</Source> - <Source>Utilities/py3flakes/translations.py</Source> + <Source>Utilities/pyflakes/__init__.py</Source> + <Source>Utilities/pyflakes/checker.py</Source> + <Source>Utilities/pyflakes/messages.py</Source> + <Source>Utilities/pyflakes/translations.py</Source> </Sources> <Forms> <Form>PyUnit/UnittestDialog.ui</Form>