fix: restore mypy ratchet after Windows updates

This commit is contained in:
jxxghp
2026-09-02 20:44:57 +08:00
parent d94f827ae1
commit 3371925d55
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ import sys
if os.name == "nt":
psql_exe = shutil.which("psql")
if psql_exe:
os.add_dll_directory(os.path.dirname(psql_exe))
getattr(os, "add_dll_directory")(os.path.dirname(psql_exe))
def _prepare_direct_execution_import_path() -> None:
"""
+2 -1
View File
@@ -251,7 +251,8 @@ class SystemHelper(ConfigReloadMixin):
"""
执行Windows重启操作
"""
def cmd(command: list) -> Tuple[bool, str]:
def cmd(command: list[str]) -> Tuple[bool, str]:
"""通过 Windows 命令解释器执行重启命令。"""
try:
subprocess.run(command, shell=True)
return True, ""