diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-12-08 09:35:03 -0800 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2021-12-15 15:40:59 -0500 |
commit | e13d92bb6a5a2a1e18b87ce4a88a744361a27952 (patch) | |
tree | 98c9ee95c39c0b1a1db62245f5e69fe98fd912e2 | |
parent | c5148d8c7365ae4da237cdb9b8f8b7904aac80ff (diff) | |
download | meson-e13d92bb6a5a2a1e18b87ce4a88a744361a27952.zip meson-e13d92bb6a5a2a1e18b87ce4a88a744361a27952.tar.gz meson-e13d92bb6a5a2a1e18b87ce4a88a744361a27952.tar.bz2 |
mesonlib: make get_meson_command return an ImmutableList
We really don't want to be mutating global state, so let mypy yell at us
when we try.
-rw-r--r-- | mesonbuild/mesonlib/universal.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py index f6c7f64..7699ea4 100644 --- a/mesonbuild/mesonlib/universal.py +++ b/mesonbuild/mesonlib/universal.py @@ -155,7 +155,7 @@ if os.path.basename(sys.executable) == 'meson.exe': python_command = [sys.executable, 'runpython'] else: python_command = [sys.executable] -_meson_command = None +_meson_command: T.Optional['ImmutableListProtocol[str]'] = None class MesonException(Exception): '''Exceptions thrown by Meson''' @@ -230,7 +230,7 @@ def set_meson_command(mainfile: str) -> None: mlog.log(f'meson_command is {_meson_command!r}') -def get_meson_command() -> T.Optional[T.List[str]]: +def get_meson_command() -> T.Optional['ImmutableListProtocol[str]']: return _meson_command |