--- a/src/eric7/Plugins/PluginVcsGit.py Wed May 24 10:31:09 2023 +0200 +++ b/src/eric7/Plugins/PluginVcsGit.py Wed May 24 10:45:11 2023 +0200 @@ -20,21 +20,23 @@ from eric7.UI import Info # Start-Of-Header -name = "Git Plugin" -author = "Detlev Offenbach <detlev@die-offenbachs.de>" -autoactivate = False -deactivateable = True -version = Info.VersionOnly -pluginType = "version_control" -pluginTypename = "Git" -className = "VcsGitPlugin" -packageName = "__core__" -shortDescription = "Implements the Git version control interface." -longDescription = """This plugin provides the Git version control interface.""" -pyqtApi = 2 +__header__ = { + "name": "Git Plugin", + "author": "Detlev Offenbach <detlev@die-offenbachs.de>", + "autoactivate": False, + "deactivateable": True, + "version": Info.VersionOnly, + "pluginType": "version_control", + "pluginTypename": "Git", + "className": "VcsGitPlugin", + "packageName": "__core__", + "shortDescription": "Implements the Git version control interface.", + "longDescription": """This plugin provides the Git version control interface.""", + "pyqtApi": 2, +} # End-Of-Header -error = "" +error = "" # noqa: U200 def exeDisplayData(): @@ -69,14 +71,14 @@ @return dictionary with indicator as key and a tuple with the vcs name (string) and vcs display string (string) """ - global pluginTypename + ##global __header__ data = {} exe = "git" if OSUtilities.isWindowsPlatform(): exe += ".exe" if FileSystemUtilities.isinpath(exe): - data[".git"] = (pluginTypename, displayString()) - data["_git"] = (pluginTypename, displayString()) + data[".git"] = (__header__["pluginTypename"], displayString()) + data["_git"] = (__header__["pluginTypename"], displayString()) return data @@ -192,10 +194,12 @@ self.__projectHelperObject = GitProjectHelper(None, None) with contextlib.suppress(KeyError): ericApp().registerPluginObject( - pluginTypename, self.__projectHelperObject, pluginType + __header__["pluginTypename"], + self.__projectHelperObject, + __header__["pluginType"], ) - readShortcuts(pluginName=pluginTypename) + readShortcuts(pluginName=__header__["pluginTypename"]) def getProjectHelper(self): """ @@ -316,7 +320,7 @@ """ Public method to prepare for an uninstallation. """ - ericApp().unregisterPluginObject(pluginTypename) + ericApp().unregisterPluginObject(__header__["pluginTypename"]) def prepareUnload(self): """ @@ -326,7 +330,7 @@ self.__projectHelperObject.removeToolbar( self.__ui, ericApp().getObject("ToolbarManager") ) - ericApp().unregisterPluginObject(pluginTypename) + ericApp().unregisterPluginObject(__header__["pluginTypename"]) #