diff -r 0b936ff1bbb9 -r a2bc06a54d9d src/eric7/Plugins/PluginCodeStyleChecker.py --- a/src/eric7/Plugins/PluginCodeStyleChecker.py Sun Nov 06 11:22:39 2022 +0100 +++ b/src/eric7/Plugins/PluginCodeStyleChecker.py Mon Nov 07 17:19:58 2022 +0100 @@ -368,6 +368,8 @@ """ Private slot used to check the project files for code style. """ + from eric7.Plugins.CheckerPlugins.CodeStyleChecker import CodeStyleCheckerDialog + project = ericApp().getObject("Project") project.saveAllScripts() ppath = project.getProjectPath() @@ -377,8 +379,6 @@ if file.endswith(tuple(Preferences.getPython("Python3Extensions"))) ] - from eric7.Plugins.CheckerPlugins.CodeStyleChecker import CodeStyleCheckerDialog - self.__projectCodeStyleCheckerDialog = ( CodeStyleCheckerDialog.CodeStyleCheckerDialog(self) ) @@ -390,6 +390,8 @@ Private method to handle the code style check context menu action of the project sources browser. """ + from eric7.Plugins.CheckerPlugins.CodeStyleChecker import CodeStyleCheckerDialog + browser = ericApp().getObject("ProjectBrowser").getProjectBrowser("sources") if browser.getSelectedItemsCount([ProjectBrowserFileItem]) > 1: fn = [] @@ -405,8 +407,6 @@ fn = itm.dirName() isDir = True - from eric7.Plugins.CheckerPlugins.CodeStyleChecker import CodeStyleCheckerDialog - self.__projectBrowserCodeStyleCheckerDialog = ( CodeStyleCheckerDialog.CodeStyleCheckerDialog(self) ) @@ -458,16 +458,14 @@ Private slot to handle the code style check context menu action of the editors. """ + from eric7.Plugins.CheckerPlugins.CodeStyleChecker import CodeStyleCheckerDialog + editor = ericApp().getObject("ViewManager").activeWindow() if ( editor is not None and editor.checkDirty() and editor.getFileName() is not None ): - from eric7.Plugins.CheckerPlugins.CodeStyleChecker import ( - CodeStyleCheckerDialog, - ) - self.__editorCodeStyleCheckerDialog = ( CodeStyleCheckerDialog.CodeStyleCheckerDialog(self) )