fix lgtm.com "Use of the return value of a procedure"

we return _log even though this entire family of functions returns None,
because a side effect of returning is that the other version of the
function is not run.

We can do that more obviously, using an else clause that doesn't attach
meaning to return values.
pull/9415/head
Eli Schwartz 3 years ago
parent 739de7b088
commit b1f0eec38f
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 5
      mesonbuild/mlog.py

@ -251,8 +251,9 @@ def cmd_ci_include(file: str) -> None:
def log(*args: TV_Loggable, is_error: bool = False,
once: bool = False, **kwargs: T.Any) -> None:
if once:
return log_once(*args, is_error=is_error, **kwargs)
return _log(*args, is_error=is_error, **kwargs)
log_once(*args, is_error=is_error, **kwargs)
else:
_log(*args, is_error=is_error, **kwargs)
def _log(*args: TV_Loggable, is_error: bool = False,

Loading…
Cancel
Save