diff options
| author | Eli Schwartz <eschwartz93@gmail.com> | 2025-09-25 12:09:51 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-09-25 12:58:43 -0400 |
| commit | a8ce600f4381ebc1e8ba9cb6ca07fc12a2d8f35d (patch) | |
| tree | ea779cd29ab4d1f91dcd84f79e8146fcf5936999 | |
| parent | 59d19370ddbf60e13263324b6787d759e0899905 (diff) | |
| download | meson-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.py | 2 |
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: |
