22 ) |
22 ) |
23 from PyQt6.QtGui import QStandardItemModel, QStandardItem, QBrush, QColor |
23 from PyQt6.QtGui import QStandardItemModel, QStandardItem, QBrush, QColor |
24 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
24 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
25 |
25 |
26 |
26 |
27 from EricWidgets.EricApplication import ericApp |
27 from eric7.EricWidgets.EricApplication import ericApp |
28 from EricWidgets import EricMessageBox |
28 from eric7.EricWidgets import EricMessageBox |
29 |
29 |
30 from .Ui_CreateDialogCodeDialog import Ui_CreateDialogCodeDialog |
30 from .Ui_CreateDialogCodeDialog import Ui_CreateDialogCodeDialog |
31 from .NewDialogClassDialog import NewDialogClassDialog |
31 from .NewDialogClassDialog import NewDialogClassDialog |
32 |
32 |
33 from eric7config import getConfig |
33 from eric7config import getConfig |
34 |
34 |
35 import Globals |
35 from eric7 import Globals, Preferences |
36 import Preferences |
|
37 |
36 |
38 |
37 |
39 pyqtSignatureRole = Qt.ItemDataRole.UserRole + 1 |
38 pyqtSignatureRole = Qt.ItemDataRole.UserRole + 1 |
40 pythonSignatureRole = Qt.ItemDataRole.UserRole + 2 |
39 pythonSignatureRole = Qt.ItemDataRole.UserRole + 2 |
41 rubySignatureRole = Qt.ItemDataRole.UserRole + 3 |
40 rubySignatureRole = Qt.ItemDataRole.UserRole + 3 |
115 return |
114 return |
116 |
115 |
117 with contextlib.suppress(ImportError): |
116 with contextlib.suppress(ImportError): |
118 splitExt = os.path.splitext(self.srcFile) |
117 splitExt = os.path.splitext(self.srcFile) |
119 exts = [splitExt[1]] if len(splitExt) == 2 else None |
118 exts = [splitExt[1]] if len(splitExt) == 2 else None |
120 from Utilities import ModuleParser |
119 from eric7.Utilities import ModuleParser |
121 |
120 |
122 self.__module = ModuleParser.readModule( |
121 self.__module = ModuleParser.readModule( |
123 self.srcFile, extensions=exts, caching=False |
122 self.srcFile, extensions=exts, caching=False |
124 ) |
123 ) |
125 |
124 |