From 3ef332e89a7050d0c03801099a0649e00c187278 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 2 Sep 2022 15:03:13 -0700 Subject: 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`. --- mesonbuild/mlog.py | 1 - 1 file changed, 1 deletion(-) (limited to 'mesonbuild/mlog.py') 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 -- cgit v1.1