Some minor corrections. eric7

Wed, 05 Oct 2022 09:39:15 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 05 Oct 2022 09:39:15 +0200
branch
eric7
changeset 9387
ce743c468d09
parent 9386
5b95a970a2d0
child 9388
bfe7ea6599a3

Some minor corrections.

src/eric7/JediInterface/AssistantJedi.py file | annotate | diff | comparison | revisions
src/eric7/JediInterface/JediClient.py file | annotate | diff | comparison | revisions
src/eric7/Project/ProjectFormsBrowser.py file | annotate | diff | comparison | revisions
--- a/src/eric7/JediInterface/AssistantJedi.py	Tue Oct 04 16:14:57 2022 +0200
+++ b/src/eric7/JediInterface/AssistantJedi.py	Wed Oct 05 09:39:15 2022 +0200
@@ -73,6 +73,7 @@
             "Pygments|Python",
             "Pygments|Python 2.x",
             "Cython",
+            "Pygments|Cython",
         ]
 
     def __editorOpened(self, editor):
--- a/src/eric7/JediInterface/JediClient.py	Tue Oct 04 16:14:57 2022 +0200
+++ b/src/eric7/JediInterface/JediClient.py	Wed Oct 05 09:39:15 2022 +0200
@@ -114,6 +114,8 @@
         if self.__project is not None:
             self.__project.save()
 
+        self.__project = None
+
     def __completionType(self, completion):
         """
         Private method to assemble the completion type depending on the
--- a/src/eric7/Project/ProjectFormsBrowser.py	Tue Oct 04 16:14:57 2022 +0200
+++ b/src/eric7/Project/ProjectFormsBrowser.py	Wed Oct 05 09:39:15 2022 +0200
@@ -909,14 +909,14 @@
             sys.path.insert(0, self.project.getProjectPath())
             cwd = os.getcwd()
             os.chdir(os.path.dirname(os.path.abspath(fn)))
-
-            dlg = CreateDialogCodeDialog(fn, self.project, self)
-            if not dlg.initError():
-                dlg.exec()
-
-            # reset the environment
-            os.chdir(cwd)
-            del sys.path[0]
+            try:
+                dlg = CreateDialogCodeDialog(fn, self.project, self)
+                if not dlg.initError():
+                    dlg.exec()
+            finally:
+                # reset the environment
+                os.chdir(cwd)
+                del sys.path[0]
 
     def __compileForm(self):
         """

eric ide

mercurial