diff --git a/src/tagstudio/core/utils/silent_subprocess.py b/src/tagstudio/core/utils/silent_subprocess.py index 680e947f1..75fb920da 100644 --- a/src/tagstudio/core/utils/silent_subprocess.py +++ b/src/tagstudio/core/utils/silent_subprocess.py @@ -2,8 +2,6 @@ # Licensed under the GPL-3.0 License. # Created for TagStudio: https://github.com/CyanVoxel/TagStudio -# pyright: reportExplicitAny=false - import os import subprocess import sys diff --git a/src/tagstudio/qt/mixed/build_tag.py b/src/tagstudio/qt/mixed/build_tag.py index cfffb6595..94e63f3e8 100644 --- a/src/tagstudio/qt/mixed/build_tag.py +++ b/src/tagstudio/qt/mixed/build_tag.py @@ -522,7 +522,7 @@ def _set_aliases(self): self.alias_names.clear() - last: QWidget = self.panel_save_button + last: QWidget | None = self.panel_save_button for alias_id in self.alias_ids: alias = self.lib.get_alias(self.tag.id, alias_id) @@ -549,7 +549,8 @@ def _set_aliases(self): self.aliases_table.setCellWidget(row, 1, new_item) self.aliases_table.setCellWidget(row, 0, remove_btn) - self.setTabOrder(last, self.aliases_table.cellWidget(row, 1)) + if last is not None: + self.setTabOrder(last, self.aliases_table.cellWidget(row, 1)) self.setTabOrder( self.aliases_table.cellWidget(row, 1), self.aliases_table.cellWidget(row, 0) ) @@ -624,3 +625,4 @@ def parent_post_init(self): self.setTabOrder(unwrap(self.panel_save_button), self.aliases_table.cellWidget(0, 1)) self.name_field.selectAll() self.name_field.setFocus() + self._set_aliases()