From 5020d0d983fdd4b3da9ef2c0227853c73c0d7a83 Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Sun, 10 Aug 2025 07:00:12 -0700 Subject: [PATCH 1/2] easy win: remove one Any --- mypy/config_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/config_parser.py b/mypy/config_parser.py index 5f08f342241e..b841d5f585f6 100644 --- a/mypy/config_parser.py +++ b/mypy/config_parser.py @@ -600,7 +600,7 @@ def parse_section( return results, report_dirs -def convert_to_boolean(value: Any | None) -> bool: +def convert_to_boolean(value: object) -> bool: """Return a boolean value translating from other types if necessary.""" if isinstance(value, bool): return value From 7cfba8e4eefd1be6691bc0808cf2300a355d43c1 Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Sun, 10 Aug 2025 07:02:58 -0700 Subject: [PATCH 2/2] easy win 2: remove an Any --- mypy/config_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/config_parser.py b/mypy/config_parser.py index b841d5f585f6..0b512e56211b 100644 --- a/mypy/config_parser.py +++ b/mypy/config_parser.py @@ -31,7 +31,7 @@ class VersionTypeError(argparse.ArgumentTypeError): """Provide a fallback value if the Python version is unsupported.""" - def __init__(self, *args: Any, fallback: tuple[int, int]) -> None: + def __init__(self, *args: object, fallback: tuple[int, int]) -> None: self.fallback = fallback super().__init__(*args)