aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonlib/universal.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-09-02 14:43:12 -0700
committerXavier Claessens <xclaesse@gmail.com>2022-09-22 18:17:43 -0400
commitf5283dd63fc40211a935330973a69aa8105aa920 (patch)
treec3ea862cb3d08ffcbe8ddaea9d70a42d6ee445de /mesonbuild/mesonlib/universal.py
parent3ef332e89a7050d0c03801099a0649e00c187278 (diff)
downloadmeson-f5283dd63fc40211a935330973a69aa8105aa920.zip
meson-f5283dd63fc40211a935330973a69aa8105aa920.tar.gz
meson-f5283dd63fc40211a935330973a69aa8105aa920.tar.bz2
pylint: enable global-statement
This does force a number of uses of `# pylint: disable` comments, but it also finds a couple of useless global uses and one place (in the previous commit) that an easy refactor removes the use of global. Global is a code smell, so forcing adding a comment to disable helps force developers to really consider if what they're doing is a good idea.
Diffstat (limited to 'mesonbuild/mesonlib/universal.py')
-rw-r--r--mesonbuild/mesonlib/universal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py
index 6f6daf4..f5a69a6 100644
--- a/mesonbuild/mesonlib/universal.py
+++ b/mesonbuild/mesonlib/universal.py
@@ -229,7 +229,7 @@ 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 _meson_command
+ global _meson_command # pylint: disable=global-statement
# On UNIX-like systems `meson` is a Python script
# On Windows `meson` and `meson.exe` are wrapper exes
if not mainfile.endswith('.py'):