eric6/eric6.py

changeset 7257
c4d0cac9b5c9
parent 7240
5d7a17a948ad
child 7315
41fdf2cd1c33
--- a/eric6/eric6.py	Sat Sep 21 20:30:56 2019 +0200
+++ b/eric6/eric6.py	Sat Sep 21 22:03:03 2019 +0200
@@ -112,8 +112,10 @@
     client = E5SingleApplicationClient()
     res = client.connect()
     if res > 0:
-        if "--no-splash" in sys.argv and \
-                sys.argv.index("--no-splash") < ddindex:
+        if (
+            "--no-splash" in sys.argv and
+            sys.argv.index("--no-splash") < ddindex
+        ):
             sys.argv.remove("--no-splash")
             ddindex -= 1
         if "--no-open" in sys.argv and sys.argv.index("--no-open") < ddindex:
@@ -121,28 +123,36 @@
             ddindex -= 1
         if "--no-crash" in sys.argv and sys.argv.index("--no-crash") < ddindex:
             sys.argv.remove("--no-crash")
-        if "--disable-crash" in sys.argv and \
-                sys.argv.index("--disable-crash") < ddindex:
+        if (
+            "--disable-crash" in sys.argv and
+            sys.argv.index("--disable-crash") < ddindex
+        ):
             sys.argv.remove("--disable-crash")
             ddindex -= 1
         if "--debug" in sys.argv and sys.argv.index("--debug") < ddindex:
             sys.argv.remove("--debug")
             ddindex -= 1
         for arg in sys.argv:
-            if arg.startswith("--config=") and \
-               sys.argv.index(arg) < ddindex:
+            if (
+                arg.startswith("--config=") and
+                sys.argv.index(arg) < ddindex
+            ):
                 sys.argv.remove(arg)
                 ddindex -= 1
                 break
         for arg in sys.argv:
-            if arg.startswith("--plugin=") and \
-               sys.argv.index(arg) < ddindex:
+            if (
+                arg.startswith("--plugin=") and
+                sys.argv.index(arg) < ddindex
+            ):
                 sys.argv.remove(arg)
                 ddindex -= 1
                 break
         for arg in sys.argv[:]:
-            if arg.startswith("--disable-plugin=") and \
-               sys.argv.index(arg) < ddindex:
+            if (
+                arg.startswith("--disable-plugin=") and
+                sys.argv.index(arg) < ddindex
+            ):
                 sys.argv.remove(arg)
                 ddindex -= 1
         
@@ -169,11 +179,12 @@
     
     separator = '-' * 80
     logFile = os.path.join(Globals.getConfigDir(), "eric6_error.log")
-    notice = \
-        """An unhandled exception occurred. Please report the problem\n"""\
-        """using the error reporting dialog or via email to <{0}>.\n"""\
+    notice = (
+        """An unhandled exception occurred. Please report the problem\n"""
+        """using the error reporting dialog or via email to <{0}>.\n"""
         """A log has been written to "{1}".\n\nError information:\n""".format(
             BugAddress, logFile)
+    )
     timeString = time.strftime("%Y-%m-%d, %H:%M:%S")
     
     versionInfo = "\n{0}\n{1}".format(
@@ -209,10 +220,12 @@
     else:
         warning = notice + msg + versionInfo
         # Escape &<> otherwise it's not visible in the error dialog
-        warning = warning\
-            .replace("&", "&amp;")\
-            .replace(">", "&gt;")\
+        warning = (
+            warning
+            .replace("&", "&amp;")
+            .replace(">", "&gt;")
             .replace("<", "&lt;")
+        )
         qWarning(warning)
 
 
@@ -331,14 +344,18 @@
         sys.argv.remove("--no-crash")
         ddindex -= 1
         nocrash = True
-    if "--disable-crash" in sys.argv and \
-            sys.argv.index("--disable-crash") < ddindex:
+    if (
+        "--disable-crash" in sys.argv and
+        sys.argv.index("--disable-crash") < ddindex
+    ):
         sys.argv.remove("--disable-crash")
         ddindex -= 1
         disablecrash = True
     for arg in sys.argv[:]:
-        if arg.startswith("--disable-plugin=") and \
-           sys.argv.index(arg) < ddindex:
+        if (
+            arg.startswith("--disable-plugin=") and
+            sys.argv.index(arg) < ddindex
+        ):
             # extract the plug-in name
             pluginName = arg.replace("--disable-plugin=", "")
             sys.argv.remove(arg)

eric ide

mercurial