fix(ci): surpress errant mypy warnings (#609)

* fix: mypy error in ts_qt

* fix: mypy error in file_opener due to conflicting types

* fix: remove unnecessary type ignores

* refix type ignore comments

* partially revert "refix type ignore comments" due to being implemented in #608
This commit is contained in:
Jann Stute
2024-11-28 22:19:08 +01:00
committed by GitHub
parent 262893a1bb
commit 20f93719d7
2 changed files with 4 additions and 3 deletions

View File

@@ -34,11 +34,11 @@ def open_file(path: str | Path, file_manager: bool = False):
normpath = Path(path).resolve().as_posix()
if file_manager:
command_name = "explorer"
command_args = '/select,"' + normpath + '"'
command_arg = '/select,"' + normpath + '"'
# For some reason, if the args are passed in a list, this will error when the
# path has spaces, even while surrounded in double quotes.
subprocess.Popen(
command_name + command_args,
command_name + command_arg,
shell=True,
close_fds=True,
creationflags=subprocess.CREATE_NEW_PROCESS_GROUP

View File

@@ -254,7 +254,7 @@ class QtDriver(DriverMixin, QObject):
if os.name == "nt":
appid = "cyanvoxel.tagstudio.9"
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(appid) # type: ignore
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(appid) # type: ignore[attr-defined,unused-ignore]
if sys.platform != "darwin":
icon = QIcon()
@@ -823,6 +823,7 @@ class QtDriver(DriverMixin, QObject):
if field.type.type == FieldTypeEnum.TEXT_LINE and field.value:
self.lib.update_entry_field(
entry_ids=entry.id,
field=field,
content=strip_web_protocol(field.value),
)