diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-12-04 13:02:53 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-12-05 00:22:10 +0200 |
commit | 286b9f0921157f920fcd5ebea8f835699e6208e7 (patch) | |
tree | 5e852508e5a8fe623d6f52b58464ad7085bf45e6 /mesonbuild/mlog.py | |
parent | 9b1a85747334e3e1c21e9a27f4aa79f7f44c1f2d (diff) | |
download | meson-286b9f0921157f920fcd5ebea8f835699e6208e7.zip meson-286b9f0921157f920fcd5ebea8f835699e6208e7.tar.gz meson-286b9f0921157f920fcd5ebea8f835699e6208e7.tar.bz2 |
lgtm: Fix Module imported with `import` and `import from`
Diffstat (limited to 'mesonbuild/mlog.py')
-rw-r--r-- | mesonbuild/mlog.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py index ace47f4..c779a58 100644 --- a/mesonbuild/mlog.py +++ b/mesonbuild/mlog.py @@ -18,8 +18,7 @@ import sys import time import platform from contextlib import contextmanager -import typing -from typing import Any, Generator, List, Optional, Sequence, TextIO, Union +from typing import Any, Generator, List, Optional, Sequence, TextIO, Union, cast from pathlib import Path """This is (mostly) a standalone module used to write logging @@ -232,7 +231,7 @@ def _log_error(severity: str, *rargs: Union[str, AnsiDecorator], **kwargs: Any) location_str = get_error_location_string(location_file, location.lineno) # Unions are frankly awful, and we have to cast here to get mypy # to understand that the list concatenation is safe - location_list = typing.cast(List[Union[str, AnsiDecorator]], [location_str]) + location_list = cast(List[Union[str, AnsiDecorator]], [location_str]) args = location_list + args log(*args, **kwargs) |