Skip to content

Commit

Permalink
Fixes markfinal#154. Removing unused typechecking ignores
Browse files Browse the repository at this point in the history
These are no longer needed following PySide6-stubs update.
  • Loading branch information
markfinal committed Jul 7, 2024
1 parent 7c53b20 commit 20909fd
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 13 deletions.
4 changes: 1 addition & 3 deletions src/cruiz/load_recipe/pages/initialprofilepage.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ def nextId(self) -> int:
return -1

def initializePage(self) -> None:
self.registerField(
"initial_profile*", self._ui.initial_profile, "currentText" # type: ignore
)
self.registerField("initial_profile*", self._ui.initial_profile, "currentText")
self._ui.initial_profile.currentIndexChanged.connect(
self._on_initial_profile_changed
)
Expand Down
4 changes: 1 addition & 3 deletions src/cruiz/load_recipe/pages/localcachepage.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ def nextId(self) -> int:
return 3

def initializePage(self) -> None:
self.registerField(
"local_cache*", self._ui.local_cache_name, "currentText" # type: ignore
)
self.registerField("local_cache*", self._ui.local_cache_name, "currentText")
self._ui.local_cache_name.currentIndexChanged.connect(
self._on_local_cache_changed
)
Expand Down
2 changes: 1 addition & 1 deletion src/cruiz/load_recipe/pages/packageversionpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def nextId(self) -> int:
return 2

def initializePage(self) -> None:
self.registerField("version*", self._ui.version, "currentText") # type: ignore
self.registerField("version*", self._ui.version, "currentText")

self._ui.version.currentTextChanged.connect(self._on_version_changed)

Expand Down
4 changes: 1 addition & 3 deletions src/cruiz/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,9 +679,7 @@ def is_recipe_active(self, uuid: QtCore.QUuid) -> bool:
for subwindow in mdi_area.subWindowList()
)

def _on_platform_theme_changed(
self, color_scheme: QtCore.Qt.ColorScheme # type: ignore[name-defined]
) -> None:
def _on_platform_theme_changed(self, color_scheme: QtCore.Qt.ColorScheme) -> None:
if color_scheme == QtCore.Qt.ColorScheme.Unknown:
color_scheme = QtCore.Qt.ColorScheme.Light
cruiz.globals.CRUIZ_THEME = color_scheme.name
Expand Down
2 changes: 1 addition & 1 deletion src/cruiz/recipe/dependencyview.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class DependencyView(QtWidgets.QGraphicsView):
def clear(self) -> None:
self.setScene(None) # type: ignore
self.setScene(None)

def visualise(self, depgraph: DependencyGraph, rankdir: int) -> None:
if rankdir == 0:
Expand Down
2 changes: 1 addition & 1 deletion src/cruiz/recipe/recipewidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ def _generate_dependency_graph(
# reset views
self._ui.configurePackageId.setText("Calculating...")
# https://stackoverflow.com/questions/46630185/qt-remove-model-from-view
self._ui.dependenciesPackageList.setModel(None) # type: ignore[arg-type]
self._ui.dependenciesPackageList.setModel(None)
self._ui.dependencyView.clear()
# calculate lock file
params = CommandParameters("lock create", workers_api.lockcreate.invoke)
Expand Down
2 changes: 1 addition & 1 deletion src/cruiz/widgets/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def clear_widgets_from_layout(layout: QtWidgets.QLayout) -> None:
Does not take child layouts into account.
"""
for i in reversed(range(layout.count())):
layout.itemAt(i).widget().setParent(None) # type: ignore
layout.itemAt(i).widget().setParent(None)


class BlockSignals:
Expand Down

0 comments on commit 20909fd

Please sign in to comment.