--- a/PluginProjectDjango.py Sat Dec 23 15:48:51 2023 +0100 +++ b/PluginProjectDjango.py Sat Dec 23 16:46:05 2023 +0100 @@ -60,7 +60,7 @@ return apis -def createDjangoPage(configDlg): +def createDjangoPage(configDlg): # noqa: U100 """ Module function to create the Django configuration page. @@ -69,8 +69,9 @@ @return reference to the configuration page @rtype DjangoPage """ + from ProjectDjango.ConfigurationPage.DjangoPage import DjangoPage + global djangoPluginObject - from ProjectDjango.ConfigurationPage.DjangoPage import DjangoPage page = DjangoPage(djangoPluginObject) return page @@ -206,27 +207,10 @@ progLanguages=self.__supportedVariants[:], ) - try: - # backward compatibility for eric7 < 22.12 - from eric7.Project.ProjectBrowser import ( - FormsBrowserFlag, - OthersBrowserFlag, - SourcesBrowserFlag, - TranslationsBrowserFlag, - ) - - Preferences.setProjectBrowserFlagsDefault( - "Django", - SourcesBrowserFlag - | FormsBrowserFlag - | TranslationsBrowserFlag - | OthersBrowserFlag, - ) - except ImportError: - Preferences.setProjectBrowsersDefault( - "Django", - ("sources", "forms", "translations", "others"), - ) + Preferences.setProjectBrowsersDefault( + "Django", + ("sources", "forms", "translations", "others"), + ) if self.__ericProject.isOpen(): self.__projectOpened() @@ -463,9 +447,10 @@ """ Public method to get a reference to the requested menu. - @param name name of the menu (string) - @return reference to the menu (QMenu) or None, if no - menu with the given name exists + @param name name of the menu + @type str + @return reference to the menu or None, if no menu with the given name exists + @rtype QMenu """ if self.__object is not None: return self.__object.getMenu(name) @@ -476,7 +461,8 @@ """ Public method to get the names of all menus. - @return menu names (list of string) + @return menu names + @rtype list of str """ if self.__object is not None: return list(self.__menus.keys()) @@ -485,4 +471,4 @@ # -# eflag: noqa = M801 +# eflag: noqa = M801, U200