diff -r c29a9da41c92 -r ff77c9a96a80 src/eric7/Utilities/__init__.py --- a/src/eric7/Utilities/__init__.py Tue Oct 01 12:05:57 2024 +0200 +++ b/src/eric7/Utilities/__init__.py Tue Oct 01 14:04:31 2024 +0200 @@ -1053,27 +1053,33 @@ sizeStr = "64-Bit" if sys.maxsize > 2**32 else "32-Bit" - info = ["Version Numbers:"] + info = [ + "Version Numbers", + "===============", + ] - info.append(" Python {0}, {1}".format(sys.version.split()[0], sizeStr)) - info.append(" Qt {0}".format(qVersion())) - info.append(" PyQt6 {0}".format(PYQT_VERSION_STR)) + info.append(f" {Program} {Version}") + info.append("") + + info.append(f" Python {sys.version.split()[0]}, {sizeStr}") + info.append(f" Qt {qVersion()}") + info.append(f" PyQt6 {PYQT_VERSION_STR}") try: from PyQt6 import QtCharts # noqa: I101, I102 - info.append(" PyQt6-Charts {0}".format(QtCharts.PYQT_CHART_VERSION_STR)) + info.append(f" PyQt6-Charts {QtCharts.PYQT_CHART_VERSION_STR}") except (AttributeError, ImportError): info.append(" PyQt6-Charts not installed") try: from PyQt6 import QtWebEngineCore # noqa: I101, I102 info.append( - " PyQt6-WebEngine {0}".format(QtWebEngineCore.PYQT_WEBENGINE_VERSION_STR) + f" PyQt6-WebEngine {QtWebEngineCore.PYQT_WEBENGINE_VERSION_STR}" ) except (AttributeError, ImportError): info.append(" PyQt6-WebEngine not installed") - info.append(" PyQt6-QScintilla {0}".format(QSCINTILLA_VERSION_STR)) - info.append(" sip {0}".format(sip_version_str)) + info.append(f" PyQt6-QScintilla {QSCINTILLA_VERSION_STR}") + info.append(f" sip {sip_version_str}") if bool(importlib.util.find_spec("PyQt6.QtWebEngineWidgets")): from eric7.WebBrowser.Tools import WebBrowserTools # noqa: I101 @@ -1081,23 +1087,25 @@ chromiumVersion, chromiumSecurityVersion, ) = WebBrowserTools.getWebEngineVersions()[0:2] - info.append(" WebEngine {0}".format(chromiumVersion)) + info.append(f" WebEngine {chromiumVersion}") if chromiumSecurityVersion: - info.append(" (Security) {0}".format(chromiumSecurityVersion)) - info.append(" {0} {1}".format(Program, Version)) + info.append(f" (Security) {chromiumSecurityVersion}") info.append("") - info.append("Platform: {0}".format(sys.platform)) + info.append("Platform") + info.append("========") + info.append(sys.platform) if os.environ.get("SOMMELIER_VERSION", ""): info[-1] += ", ChromeOS" - info.append(sys.version) + info.append(f"Python {sys.version}") desktop = DesktopUtilities.desktopName() if desktop: info.append("") - info.append("Desktop: {0}".format(desktop)) + info.append(f"Desktop: {desktop}") session = DesktopUtilities.sessionType() if session: - info.append("") - info.append("Session Type: {0}".format(session)) + if not desktop: + info.append("") + info.append(f"Session Type: {session}") return linesep.join(info) @@ -1120,10 +1128,11 @@ for pinfo in pm.getPluginInfos(): versions[pinfo["module_name"]] = pinfo["version"] - info.append("Plugins Version Numbers:") + info.append("Plugin Version Numbers") + info.append("======================") for pluginModuleName in sorted(versions): info.append( - " {0} {1}".format(pluginModuleName, versions[pluginModuleName]) + f" {pluginModuleName} {versions[pluginModuleName]}" ) return linesep.join(info) @@ -1142,7 +1151,8 @@ if OSUtilities.isLinuxPlatform() or OSUtilities.isFreeBsdPlatform(): releaseList = glob.glob("/etc/*-release") if releaseList: - info.append("Distribution Info:") + info.append("Distribution Info") + info.append("=================") for rfile in releaseList: try: with open(rfile, "r") as f: