RefactoringRope/RefactoringClient.py

branch
eric7
changeset 365
f740b50380df
parent 362
792c2651fbd7
child 374
958f34e97952
equal deleted inserted replaced
364:a92b3272f4c1 365:f740b50380df
20 except ImportError: 20 except ImportError:
21 sys.exit(42) 21 sys.exit(42)
22 22
23 from ProgressHandle import ProgressHandle 23 from ProgressHandle import ProgressHandle
24 24
25 try: 25 from eric7.EricNetwork.EricJsonClient import EricJsonClient
26 from eric6.E5Network.E5JsonClient import E5JsonClient
27 except ImportError:
28 # TODO: delete JsonClient once ported to eric7
29 from JsonClient import JsonClient as E5JsonClient
30 26
31 27
32 class RefactoringClient(E5JsonClient): 28 class RefactoringClient(EricJsonClient):
33 """ 29 """
34 Class implementing the refactoring client interface to rope. 30 Class implementing the refactoring client interface to rope.
35 """ 31 """
36 def __init__(self, host, port, projectPath): 32 def __init__(self, host, port, projectPath):
37 """ 33 """
183 """ 179 """
184 result = { 180 result = {
185 "RopeFolderName": self.__project.ropefolder.real_path, 181 "RopeFolderName": self.__project.ropefolder.real_path,
186 "DefaultConfig": self.__project._default_config(), 182 "DefaultConfig": self.__project._default_config(),
187 "RopeHelpFile": os.path.join( 183 "RopeHelpFile": os.path.join(
188 os.path.dirname(__file__), "rope", "docs", "overview.rst"), 184 os.path.dirname(__file__), "Documentation", "rope", "overview.rst"),
189 "RopeInfo": rope.INFO, 185 "RopeInfo": rope.INFO,
190 "RopeVersion": rope.VERSION, 186 "RopeVersion": rope.VERSION,
191 "RopeCopyright": rope.COPYRIGHT, 187 "RopeCopyright": rope.COPYRIGHT,
192 "PythonVersion": "Python{0}".format(sys.version_info[0]), 188 "PythonVersion": "Python{0}".format(sys.version_info[0]),
193 } 189 }
1508 ' missing. Abort.') 1504 ' missing. Abort.')
1509 sys.exit(1) 1505 sys.exit(1)
1510 1506
1511 host, port, projectPath = sys.argv[1:-1] 1507 host, port, projectPath = sys.argv[1:-1]
1512 1508
1513 # Create a Qt5 application object in order to allow the processing of 1509 # Create a Qt6 application object in order to allow the processing of
1514 # modules containing Qt stuff. 1510 # modules containing Qt stuff.
1515 try: 1511 try:
1516 from PyQt5.QtCore import QCoreApplication 1512 from PyQt6.QtCore import QCoreApplication
1517 except ImportError: 1513 except ImportError:
1518 QCoreApplication = None 1514 QCoreApplication = None
1519 if QCoreApplication is not None: 1515 if QCoreApplication is not None:
1520 app = QCoreApplication(sys.argv) 1516 app = QCoreApplication(sys.argv)
1521 1517

eric ide

mercurial