lib.log: Fix mypy.possibly-undefined fallout
The log_m() function has margs conditionally assigned inside an if block but used unconditionally afterwards. Initialize margs outside the if to guarantee it is always defined. Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev 0.81.1 Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
5f6559dbe0
commit
a9bbbb9a89
1 changed files with 1 additions and 1 deletions
|
|
@ -175,8 +175,8 @@ def get_caller_pos(up: int = 1,
|
||||||
def log_m(prio: int, *args, **kwargs) -> None: # export
|
def log_m(prio: int, *args, **kwargs) -> None: # export
|
||||||
if prio > _level:
|
if prio > _level:
|
||||||
return
|
return
|
||||||
if len(args):
|
|
||||||
margs = ''
|
margs = ''
|
||||||
|
if len(args):
|
||||||
for a in args:
|
for a in args:
|
||||||
if isinstance(a, list):
|
if isinstance(a, list):
|
||||||
margs += '\n'.join([str(elem) for elem in a])
|
margs += '\n'.join([str(elem) for elem in a])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue