eric6/Debugger/DebuggerInterfacePython.py

changeset 7251
bc5b1b00560a
parent 7249
0bf517e60f54
child 7360
9190402e4505
diff -r d8bdc55aee1a -r bc5b1b00560a eric6/Debugger/DebuggerInterfacePython.py
--- a/eric6/Debugger/DebuggerInterfacePython.py	Sat Sep 21 13:03:17 2019 +0200
+++ b/eric6/Debugger/DebuggerInterfacePython.py	Sat Sep 21 13:37:58 2019 +0200
@@ -12,8 +12,9 @@
 import os
 import logging
 
-from PyQt5.QtCore import QObject, QTextCodec, QProcess, QProcessEnvironment, \
-    QTimer
+from PyQt5.QtCore import (
+    QObject, QTextCodec, QProcess, QProcessEnvironment, QTimer
+)
 from PyQt5.QtWidgets import QInputDialog
 
 from E5Gui.E5Application import e5App
@@ -72,11 +73,11 @@
         if passive:
             # set translation function
             if Preferences.getDebugger("PathTranslation"):
-                self.translateRemote = \
-                    Preferences.getDebugger("PathTranslationRemote")
+                self.translateRemote = Preferences.getDebugger(
+                    "PathTranslationRemote")
                 self.translateRemoteWindows = "\\" in self.translateRemote
-                self.translateLocal = \
-                    Preferences.getDebugger("PathTranslationLocal")
+                self.translateLocal = Preferences.getDebugger(
+                    "PathTranslationLocal")
                 self.translateLocalWindows = "\\" in self.translateLocal
                 self.translate = self.__remoteTranslation
             else:
@@ -177,8 +178,8 @@
         venvManager = e5App().getObject("VirtualEnvManager")
         interpreter = venvManager.getVirtualenvInterpreter(venvName)
         execPath = venvManager.getVirtualenvExecPath(venvName)
-        if interpreter == "" and \
-           int(self.__variant[-1]) == sys.version_info[0]:
+        if (interpreter == "" and
+                int(self.__variant[-1]) == sys.version_info[0]):
             # use the interpreter used to run eric for identical variants
             interpreter = sys.executable.replace("w.exe", ".exe")
         if interpreter == "":
@@ -210,12 +211,12 @@
         
         if self.__variant == "Python2":
             redirect = str(Preferences.getDebugger("PythonRedirect"))
-            noencoding = Preferences.getDebugger("PythonNoEncoding") and \
-                '--no-encoding' or ''
+            noencoding = (Preferences.getDebugger("PythonNoEncoding") and
+                          '--no-encoding' or '')
         else:
             redirect = str(Preferences.getDebugger("Python3Redirect"))
-            noencoding = Preferences.getDebugger("Python3NoEncoding") and \
-                '--no-encoding' or ''
+            noencoding = (Preferences.getDebugger("Python3NoEncoding") and
+                          '--no-encoding' or '')
         
         if Preferences.getDebugger("RemoteDbgEnabled"):
             ipaddr = self.debugServer.getHostAddress(False)
@@ -224,9 +225,9 @@
             if rhost == "":
                 rhost = "localhost"
             if rexec:
-                args = Utilities.parseOptionString(rexec) + \
-                    [rhost, interpreter, debugClient,
-                        noencoding, str(port), redirect, ipaddr]
+                args = Utilities.parseOptionString(rexec) + [
+                    rhost, interpreter, debugClient, noencoding, str(port),
+                    redirect, ipaddr]
                 if Utilities.isWindowsPlatform():
                     if not os.path.splitext(args[0])[1]:
                         for ext in [".exe", ".com", ".cmd", ".bat"]:
@@ -248,11 +249,11 @@
                 
                 # set translation function
                 if Preferences.getDebugger("PathTranslation"):
-                    self.translateRemote = \
-                        Preferences.getDebugger("PathTranslationRemote")
+                    self.translateRemote = Preferences.getDebugger(
+                        "PathTranslationRemote")
                     self.translateRemoteWindows = "\\" in self.translateRemote
-                    self.translateLocal = \
-                        Preferences.getDebugger("PathTranslationLocal")
+                    self.translateLocal = Preferences.getDebugger(
+                        "PathTranslationLocal")
                     self.translate = self.__remoteTranslation
                     self.translateLocalWindows = "\\" in self.translateLocal
                 else:
@@ -290,9 +291,9 @@
         if runInConsole or Preferences.getDebugger("ConsoleDbgEnabled"):
             ccmd = Preferences.getDebugger("ConsoleDbgCommand")
             if ccmd:
-                args = Utilities.parseOptionString(ccmd) + \
-                    [interpreter, os.path.abspath(debugClient),
-                        noencoding, str(port), '0', ipaddr]
+                args = Utilities.parseOptionString(ccmd) + [
+                    interpreter, os.path.abspath(debugClient), noencoding,
+                    str(port), '0', ipaddr]
                 args[0] = Utilities.getExecutablePath(args[0])
                 process = self.__startProcess(args[0], args[1:], clientEnv,
                                               workingDir=workingDir)
@@ -359,15 +360,15 @@
                 venvName = Preferences.getDebugger("Python3VirtualEnv")
         
         redirect = str(project.getDebugProperty("REDIRECT"))
-        noencoding = \
-            project.getDebugProperty("NOENCODING") and '--no-encoding' or ''
+        noencoding = (
+            project.getDebugProperty("NOENCODING") and '--no-encoding' or '')
         
         venvManager = e5App().getObject("VirtualEnvManager")
         interpreter = venvManager.getVirtualenvInterpreter(venvName)
         execPath = venvManager.getVirtualenvExecPath(venvName)
-        if interpreter == "" and \
-           project.getProjectLanguage().startswith("Python") and \
-           sys.version_info[0] == int(project.getProjectLanguage()[-1]):
+        if (interpreter == "" and
+            project.getProjectLanguage().startswith("Python") and
+                sys.version_info[0] == int(project.getProjectLanguage()[-1])):
             interpreter = sys.executable.replace("w.exe", ".exe")
         if interpreter == "":
             E5MessageBox.critical(
@@ -385,9 +386,9 @@
             if rhost == "":
                 rhost = "localhost"
             if rexec:
-                args = Utilities.parseOptionString(rexec) + \
-                    [rhost, interpreter, debugClient, noencoding,
-                     str(port), redirect, ipaddr]
+                args = Utilities.parseOptionString(rexec) + [
+                    rhost, interpreter, debugClient, noencoding, str(port),
+                    redirect, ipaddr]
                 if Utilities.isWindowsPlatform():
                     if not os.path.splitext(args[0])[1]:
                         for ext in [".exe", ".com", ".cmd", ".bat"]:
@@ -408,11 +409,10 @@
                             """ started.</p>"""))
                 # set translation function
                 if project.getDebugProperty("PATHTRANSLATION"):
-                    self.translateRemote = \
-                        project.getDebugProperty("REMOTEPATH")
+                    self.translateRemote = project.getDebugProperty(
+                        "REMOTEPATH")
                     self.translateRemoteWindows = "\\" in self.translateRemote
-                    self.translateLocal = \
-                        project.getDebugProperty("LOCALPATH")
+                    self.translateLocal = project.getDebugProperty("LOCALPATH")
                     self.translateLocalWindows = "\\" in self.translateLocal
                     self.translate = self.__remoteTranslation
                 else:
@@ -451,12 +451,12 @@
         
         ipaddr = self.debugServer.getHostAddress(True)
         if runInConsole or project.getDebugProperty("CONSOLEDEBUGGER"):
-            ccmd = project.getDebugProperty("CONSOLECOMMAND") or \
-                Preferences.getDebugger("ConsoleDbgCommand")
+            ccmd = (project.getDebugProperty("CONSOLECOMMAND") or
+                    Preferences.getDebugger("ConsoleDbgCommand"))
             if ccmd:
-                args = Utilities.parseOptionString(ccmd) + \
-                    [interpreter, os.path.abspath(debugClient),
-                        noencoding, str(port), '0', ipaddr]
+                args = Utilities.parseOptionString(ccmd) + [
+                    interpreter, os.path.abspath(debugClient), noencoding,
+                    str(port), '0', ipaddr]
                 args[0] = Utilities.getExecutablePath(args[0])
                 process = self.__startProcess(args[0], args[1:], clientEnv,
                                               workingDir=workingDir)

eric ide

mercurial