Fixed some code style issue related to implicitly and explicitly concatenated strings. eric7

Sun, 03 Dec 2023 16:44:52 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 03 Dec 2023 16:44:52 +0100
branch
eric7
changeset 10372
1444b4bee64b
parent 10371
1f54843e8152
child 10373
093dcebe5ecb

Fixed some code style issue related to implicitly and explicitly concatenated strings.

eric7.epj file | annotate | diff | comparison | revisions
scripts/create_windows_links.py file | annotate | diff | comparison | revisions
scripts/install.py file | annotate | diff | comparison | revisions
scripts/uninstall.py file | annotate | diff | comparison | revisions
src/eric7/IconEditor/IconEditorWindow.py file | annotate | diff | comparison | revisions
src/eric7/MultiProject/MultiProject.py file | annotate | diff | comparison | revisions
src/eric7/PipInterface/Pip.py file | annotate | diff | comparison | revisions
src/eric7/PluginManager/PluginManager.py file | annotate | diff | comparison | revisions
src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Async/translations.py file | annotate | diff | comparison | revisions
src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityUtils.py file | annotate | diff | comparison | revisions
src/eric7/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py file | annotate | diff | comparison | revisions
src/eric7/Plugins/VcsPlugins/vcsMercurial/hg.py file | annotate | diff | comparison | revisions
src/eric7/Preferences/ConfigurationPages/WebBrowserVirusTotalPage.py file | annotate | diff | comparison | revisions
src/eric7/Preferences/__init__.py file | annotate | diff | comparison | revisions
src/eric7/QScintilla/Exporters/ExporterHTML.py file | annotate | diff | comparison | revisions
src/eric7/eric7_post_install.py file | annotate | diff | comparison | revisions
--- a/eric7.epj	Sun Dec 03 16:32:00 2023 +0100
+++ b/eric7.epj	Sun Dec 03 16:44:52 2023 +0100
@@ -68,7 +68,7 @@
         "DocstringType": "eric_black",
         "EnabledCheckerCategories": "C, D, E, I, L, M, NO, N, Y, U, W",
         "ExcludeFiles": "*/ThirdParty/*, */coverage/*, */Ui_*.py, */Examples/*, */pycodestyle.py,*/pyflakes/checker.py,*/mccabe.py,*/eradicate.py,*/ast_unparse.py,*/piplicenses.py,*/pipdeptree.py,*/MCUScripts/*,*/MicroPython/Tools/*",
-        "ExcludeMessages": "C101,E203,E265,E266,E305,E402,M201,M701,M702,M811,M834,N802,N803,N807,N808,N821,W293,W503,Y119,Y401,Y402",
+        "ExcludeMessages": "C101,E203,E265,E266,E305,E402,M201,M701,M702,M811,M834,M852,N802,N803,N807,N808,N821,W293,W503,Y119,Y401,Y402",
         "FixCodes": "",
         "FixIssues": false,
         "FutureChecker": "",
--- a/scripts/create_windows_links.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/scripts/create_windows_links.py	Sun Dec 03 16:44:52 2023 +0100
@@ -28,8 +28,7 @@
     """
     if sys.platform.startswith(("win", "cygwin")):
         regPath = (
-            "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"
-            + "\\User Shell Folders"
+            "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"
         )
 
         # 1. create desktop shortcuts
--- a/scripts/install.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/scripts/install.py	Sun Dec 03 16:44:52 2023 +0100
@@ -623,8 +623,7 @@
     global doCleanDesktopLinks, forceCleanDesktopLinks
 
     regPath = (
-        "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"
-        + "\\User Shell Folders"
+        "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"
     )
 
     if doCleanDesktopLinks or forceCleanDesktopLinks:
@@ -1070,8 +1069,7 @@
         return
 
     regPath = (
-        "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"
-        + "\\User Shell Folders"
+        "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"
     )
 
     # 1. create desktop shortcuts
--- a/scripts/uninstall.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/scripts/uninstall.py	Sun Dec 03 16:44:52 2023 +0100
@@ -243,8 +243,7 @@
         return
 
     regPath = (
-        "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"
-        + "\\User Shell Folders"
+        "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"
     )
 
     # 1. cleanup desktop links
--- a/src/eric7/IconEditor/IconEditorWindow.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/src/eric7/IconEditor/IconEditorWindow.py	Sun Dec 03 16:44:52 2023 +0100
@@ -1241,7 +1241,7 @@
                 self,
                 self.tr("Save icon file"),
                 self.tr(
-                    "<p>The file <b>{0}</b> already exists." " Overwrite it?</p>"
+                    "<p>The file <b>{0}</b> already exists. Overwrite it?</p>"
                 ).format(fpath),
                 icon=EricMessageBox.Warning,
             )
--- a/src/eric7/MultiProject/MultiProject.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/src/eric7/MultiProject/MultiProject.py	Sun Dec 03 16:44:52 2023 +0100
@@ -614,7 +614,7 @@
                     self.parent(),
                     self.tr("Save File"),
                     self.tr(
-                        "<p>The file <b>{0}</b> already exists." " Overwrite it?</p>"
+                        "<p>The file <b>{0}</b> already exists. Overwrite it?</p>"
                     ).format(fn),
                     icon=EricMessageBox.Warning,
                 )
--- a/src/eric7/PipInterface/Pip.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/src/eric7/PipInterface/Pip.py	Sun Dec 03 16:44:52 2023 +0100
@@ -130,7 +130,7 @@
                 process.waitForFinished(2000)
                 process.kill()
                 process.waitForFinished(3000)
-                return False, self.tr("python did not finish within" " 30 seconds.")
+                return False, self.tr("python did not finish within 30 seconds.")
 
         return False, self.tr("python could not be started.")
 
--- a/src/eric7/PluginManager/PluginManager.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/src/eric7/PluginManager/PluginManager.py	Sun Dec 03 16:44:52 2023 +0100
@@ -240,11 +240,11 @@
                 os.mkdir(self.pluginDirs["global"], 0o755)
                 fname = os.path.join(self.pluginDirs["global"], "__init__.py")
                 with open(fname, "w", encoding="utf-8") as f:
-                    f.write("# -*- coding: utf-8 -*-" + "\n")
+                    f.write("# -*- coding: utf-8 -*-\n")
                     f.write("\n")
-                    f.write('"""' + "\n")
-                    f.write("Package containing the global plugins." + "\n")
-                    f.write('"""' + "\n")
+                    f.write('"""\n')
+                    f.write("Package containing the global plugins.\n")
+                    f.write('"""\n')
             except OSError:
                 del self.pluginDirs["global"]
 
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Async/translations.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Async/translations.py	Sun Dec 03 16:44:52 2023 +0100
@@ -27,7 +27,7 @@
     ),
     "ASY104": QCoreApplication.translate(
         "AsyncChecker",
-        "avoid using os.path, prefer using 'trio.Path' or 'anyio.Path'" " objects",
+        "avoid using os.path, prefer using 'trio.Path' or 'anyio.Path' objects",
     ),
     "ASY105": QCoreApplication.translate(
         "AsyncChecker",
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityUtils.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityUtils.py	Sun Dec 03 16:44:52 2023 +0100
@@ -45,7 +45,7 @@
     (head, tail) = os.path.split(path)
     if head == "" or tail == "":
         raise InvalidModulePathError(
-            'Invalid python file path: "{0}"' " Missing path or file name".format(path)
+            'Invalid python file path: "{0}" Missing path or file name'.format(path)
         )
 
     qname = [os.path.splitext(tail)[0]]
--- a/src/eric7/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/src/eric7/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Sun Dec 03 16:44:52 2023 +0100
@@ -2339,7 +2339,7 @@
                 self,
                 self.tr("Move Bookmark"),
                 self.tr(
-                    "Select the bookmark to be moved  to changeset" ' "{0}":'
+                    "Select the bookmark to be moved to changeset '{0}':"
                 ).format(changeset),
                 [""] + bookmarksList,
                 0,
--- a/src/eric7/Plugins/VcsPlugins/vcsMercurial/hg.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/src/eric7/Plugins/VcsPlugins/vcsMercurial/hg.py	Sun Dec 03 16:44:52 2023 +0100
@@ -1008,7 +1008,7 @@
                 self.parent(),
                 self.tr("Re-Merge"),
                 self.tr(
-                    "Do you really want to re-merge these files" " or directories?"
+                    "Do you really want to re-merge these files or directories?"
                 ),
                 names,
             )
--- a/src/eric7/Preferences/ConfigurationPages/WebBrowserVirusTotalPage.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/src/eric7/Preferences/ConfigurationPages/WebBrowserVirusTotalPage.py	Sun Dec 03 16:44:52 2023 +0100
@@ -85,7 +85,7 @@
             if msg == "":
                 self.testResultLabel.setText(
                     self.tr(
-                        '<font color="#FF0000">The service key is' " not valid.</font>"
+                        """<font color="#FF0000">The service key is not valid.</font>"""
                     )
                 )
             else:
--- a/src/eric7/Preferences/__init__.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/src/eric7/Preferences/__init__.py	Sun Dec 03 16:44:52 2023 +0100
@@ -1427,12 +1427,12 @@
 
     # defaults for tasks related stuff
     tasksDefaults = {
-        "TasksFixmeMarkers": "FIX" + "ME:",
-        "TasksWarningMarkers": "WARN" + "ING:",
-        "TasksTodoMarkers": "TO" + "DO:",
-        "TasksNoteMarkers": "NO" + "TE:",
-        "TasksTestMarkers": "TE" + "ST:",
-        "TasksDocuMarkers": "DO" + "CU:",
+        "TasksFixmeMarkers": "FIXME:",  # __NO-TASK__
+        "TasksWarningMarkers": "WARNING:",  # __NO-TASK__
+        "TasksTodoMarkers": "TODO:",  # __NO-TASK__
+        "TasksNoteMarkers": "NOTE:",  # __NO-TASK__
+        "TasksTestMarkers": "TEST:",  # __NO-TASK__
+        "TasksDocuMarkers": "DOCU:",  # __NO-TASK__
         # needed to keep it from being recognized as a task
         "TasksFixmeColor": QColor("#FFA0A0"),
         "TasksWarningColor": QColor("#FFFFA0"),
--- a/src/eric7/QScintilla/Exporters/ExporterHTML.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/src/eric7/QScintilla/Exporters/ExporterHTML.py	Sun Dec 03 16:44:52 2023 +0100
@@ -329,7 +329,7 @@
                         & QsciScintilla.SC_FOLDLEVELHEADERFLAG
                     ):
                         html += (
-                            '''<span id="hd{0:d}"''' """ onclick="toggle('{1:d}')">"""
+                            """<span id="hd{0:d}" onclick="toggle('{1:d}')">"""
                         ).format(line, line + 1)
                         html += """<span id="bt{0:d}">- </span>""".format(line)
                         inFoldSpan = True
--- a/src/eric7/eric7_post_install.py	Sun Dec 03 16:32:00 2023 +0100
+++ b/src/eric7/eric7_post_install.py	Sun Dec 03 16:44:52 2023 +0100
@@ -24,8 +24,7 @@
     Create Desktop and Start Menu links.
     """
     regPath = (
-        "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"
-        + "\\User Shell Folders"
+        "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"
     )
 
     # 1. create desktop shortcuts

eric ide

mercurial