|
30 | 30 | font_size = "9pt" |
31 | 31 |
|
32 | 32 | try: |
33 | | - # noinspection PyUnresolvedReferences |
34 | 33 | from PySide6.QtCore import QPoint, QSettings, QSize, Qt, Slot |
35 | | - |
36 | | - # noinspection PyUnresolvedReferences |
37 | 34 | from PySide6.QtGui import QAction, QColor |
38 | 35 | from PySide6.QtWidgets import ( |
39 | 36 | QAbstractItemView, |
@@ -63,14 +60,11 @@ def text(key, contents): |
63 | 60 | return desc or key |
64 | 61 |
|
65 | 62 |
|
66 | | -# noinspection PyArgumentList |
67 | 63 | def get_settings(): |
68 | 64 | return QSettings("cobaya", "gui") |
69 | 65 |
|
70 | 66 |
|
71 | | -# noinspection PyArgumentList |
72 | 67 | class MainWindow(QWidget): |
73 | | - # noinspection PyUnresolvedReferences |
74 | 68 | def __init__(self): |
75 | 69 | super().__init__() |
76 | 70 | self.setWindowTitle("Cobaya input generator for Cosmology") |
@@ -176,14 +170,13 @@ def __init__(self): |
176 | 170 | def getScreen(self): |
177 | 171 | try: |
178 | 172 | return self.screen().availableGeometry() |
179 | | - except: |
| 173 | + except Exception: |
180 | 174 | return QApplication.screenAt( |
181 | 175 | self.mapToGlobal(QPoint(self.width() // 2, 0)) |
182 | 176 | ).availableGeometry() |
183 | 177 |
|
184 | 178 | def read_settings(self): |
185 | 179 | settings = get_settings() |
186 | | - # noinspection PyArgumentList |
187 | 180 | screen = self.getScreen() |
188 | 181 | h = min(screen.height() * 5 / 6.0, 900) |
189 | 182 | size = QSize(min(screen.width() * 5 / 6.0, 1200), h) |
@@ -379,13 +372,11 @@ def show_defaults(self): |
379 | 372 | self.current_defaults_diag = DefaultsDialog(kind, component, parent=self) |
380 | 373 |
|
381 | 374 |
|
382 | | -# noinspection PyUnresolvedReferences,PyArgumentList |
383 | 375 | class DefaultsDialog(QWidget): |
384 | 376 | def __init__(self, kind, component, parent=None): |
385 | 377 | super().__init__() |
386 | 378 | self.setWindowTitle(f"{kind} : {component}") |
387 | 379 | self.setGeometry(0, 0, 500, 500) |
388 | | - # noinspection PyArgumentList |
389 | 380 | self.move(parent.getScreen().center() - self.rect().center()) |
390 | 381 | self.show() |
391 | 382 | # Main layout |
@@ -433,7 +424,6 @@ def copy_clipb(self): |
433 | 424 | QApplication.clipboard().setText(self.display_tabs.currentWidget().toPlainText()) |
434 | 425 |
|
435 | 426 |
|
436 | | -# noinspection PyArgumentList |
437 | 427 | def gui_script(): |
438 | 428 | warn_deprecation() |
439 | 429 | try: |
|
0 commit comments