summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2025-09-25 12:09:51 -0400
committerEli Schwartz <eschwartz93@gmail.com>2025-09-25 12:58:43 -0400
commita8ce600f4381ebc1e8ba9cb6ca07fc12a2d8f35d (patch)
treeea779cd29ab4d1f91dcd84f79e8146fcf5936999
parent59d19370ddbf60e13263324b6787d759e0899905 (diff)
downloadmeson-a8ce600f4381ebc1e8ba9cb6ca07fc12a2d8f35d.tar.gz
mypy: loosen type ignore
The type error is renamed to union-attr in some mypy versions, which raises TWO errors: - Unused "type: ignore" comment - Item "TextIO" of "TextIO | Any" has no attribute "colorize_console" ... which broadly speaking indicates that we should not be using targeted ignores, after all. A proper inheritance system for ignore types would be more fitting, but seemingly doesn't exist.
-rw-r--r--mesonbuild/mlog.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
index b43ac8a69..86ac0d102 100644
--- a/mesonbuild/mlog.py
+++ b/mesonbuild/mlog.py
@@ -394,7 +394,7 @@ class _Logger:
_colorize_console = os.isatty(output.fileno()) and os.environ.get('TERM', 'dumb') != 'dumb'
except Exception:
_colorize_console = False
- output.colorize_console = _colorize_console # type: ignore[attr-defined]
+ output.colorize_console = _colorize_console # type: ignore
return _colorize_console
def setup_console(self) -> None: