diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-09-02 15:03:13 -0700 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2022-09-22 18:17:43 -0400 |
commit | 3ef332e89a7050d0c03801099a0649e00c187278 (patch) | |
tree | 51f0c1995d8c95d4dcb57c7cb805be12a779a322 /mesonbuild | |
parent | 1917b9253e70ae3469b97673f479d54d37b3b881 (diff) | |
download | meson-3ef332e89a7050d0c03801099a0649e00c187278.zip meson-3ef332e89a7050d0c03801099a0649e00c187278.tar.gz meson-3ef332e89a7050d0c03801099a0649e00c187278.tar.bz2 |
pylint: enable global-variable-not-assigned
The `global` statement is only needed to assign to global variables, not
read or mutate them. So calling `global.mutate()` is fine, but not
`var = foo`, which would otherwise shadow `var`.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/mesonlib/universal.py | 1 | ||||
-rw-r--r-- | mesonbuild/mlog.py | 1 | ||||
-rw-r--r-- | mesonbuild/scripts/symbolextractor.py | 1 |
3 files changed, 0 insertions, 3 deletions
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py index 4fbdf1e..6f6daf4 100644 --- a/mesonbuild/mesonlib/universal.py +++ b/mesonbuild/mesonlib/universal.py @@ -229,7 +229,6 @@ def verbose_git(cmd: T.List[str], workingdir: T.Union[str, bytes, os.PathLike], return p.returncode == 0 def set_meson_command(mainfile: str) -> None: - global python_command global _meson_command # On UNIX-like systems `meson` is a Python script # On Windows `meson` and `meson.exe` are wrapper exes diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py index cd06738..1bdc1ca 100644 --- a/mesonbuild/mlog.py +++ b/mesonbuild/mlog.py @@ -396,7 +396,6 @@ def format_list(input_list: T.List[str]) -> str: @contextmanager def nested(name: str = '') -> T.Generator[None, None, None]: - global log_depth log_depth.append(name) try: yield diff --git a/mesonbuild/scripts/symbolextractor.py b/mesonbuild/scripts/symbolextractor.py index 8f61ad4..8992e94 100644 --- a/mesonbuild/scripts/symbolextractor.py +++ b/mesonbuild/scripts/symbolextractor.py @@ -53,7 +53,6 @@ def write_if_changed(text: str, outfilename: str) -> None: f.write(text) def print_tool_warning(tools: T.List[str], msg: str, stderr: T.Optional[str] = None) -> None: - global TOOL_WARNING_FILE if os.path.exists(TOOL_WARNING_FILE): return m = f'{tools!r} {msg}. {RELINKING_WARNING}' |