25 |
25 |
26 from eric7 import Globals, Preferences |
26 from eric7 import Globals, Preferences |
27 from eric7.EricWidgets import EricMessageBox |
27 from eric7.EricWidgets import EricMessageBox |
28 from eric7.EricWidgets.EricApplication import ericApp |
28 from eric7.EricWidgets.EricApplication import ericApp |
29 from eric7.Globals import getConfig |
29 from eric7.Globals import getConfig |
|
30 from eric7.Utilities import ModuleParser |
30 |
31 |
31 from .NewDialogClassDialog import NewDialogClassDialog |
32 from .NewDialogClassDialog import NewDialogClassDialog |
32 from .Ui_CreateDialogCodeDialog import Ui_CreateDialogCodeDialog |
33 from .Ui_CreateDialogCodeDialog import Ui_CreateDialogCodeDialog |
33 |
34 |
34 pyqtSignatureRole = Qt.ItemDataRole.UserRole + 1 |
35 pyqtSignatureRole = Qt.ItemDataRole.UserRole + 1 |
110 return |
111 return |
111 |
112 |
112 with contextlib.suppress(ImportError): |
113 with contextlib.suppress(ImportError): |
113 splitExt = os.path.splitext(self.srcFile) |
114 splitExt = os.path.splitext(self.srcFile) |
114 exts = [splitExt[1]] if len(splitExt) == 2 else None |
115 exts = [splitExt[1]] if len(splitExt) == 2 else None |
115 from eric7.Utilities import ModuleParser |
|
116 |
|
117 self.__module = ModuleParser.readModule( |
116 self.__module = ModuleParser.readModule( |
118 self.srcFile, extensions=exts, caching=False |
117 self.srcFile, extensions=exts, caching=False |
119 ) |
118 ) |
120 |
119 |
121 if self.__module is not None: |
120 if self.__module is not None: |