From 2a1ef0b79e50894dc282a9603b1b3f730e87e17b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikul=C3=A1=C5=A1=20Zelinka?= Date: Thu, 5 Jan 2023 18:30:10 +0100 Subject: [PATCH] fix: mypy unused ignore, https://github.com/python/mypy/issues/8823 --- pyproject.toml | 4 ++++ src/searchlauncher/gui.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index eae61b7..95809e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,10 @@ profile = "black" disallow_untyped_defs = true strict = true +# this is specifically for "from ctypes import windll # type: ignore" +# open issue: https://github.com/python/mypy/issues/8823 +warn_unused_ignores = false + [[tool.mypy.overrides]] module = "tests.*" disallow_untyped_defs = false diff --git a/src/searchlauncher/gui.py b/src/searchlauncher/gui.py index 3ec4c49..3b9ee44 100644 --- a/src/searchlauncher/gui.py +++ b/src/searchlauncher/gui.py @@ -58,7 +58,7 @@ def show_launcher(group_name: str) -> None: def start_gui() -> None: if platform.system() == "Windows": logger.debug("Fixing resolution scaling on Windows") - from ctypes import windll + from ctypes import windll # type: ignore # Fix blurry font with resolution scaling on Windows: windll.shcore.SetProcessDpiAwareness(1)