Skip to content

Commit

Permalink
Only give warning if relevant.
Browse files Browse the repository at this point in the history
  • Loading branch information
eskildsf committed Dec 19, 2024
1 parent 3923ef4 commit cb42029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reloading/reloading.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def _reloading_loop(seq: Union[Iterable, bool]) -> Iterable:
# print(i)
loop_caller_frame: inspect.FrameInfo = stack[3]
loop_caller_frame.frame.f_locals.update(loop_frame_info.frame.f_locals)
else:
elif len(stack) > 3:
variables = ", ".join(
f'"{k}"' for k in loop_frame_info.frame.f_locals.keys())
log.warning(f"Variable(s) {variables} in reloaded loop were not "
Expand Down

0 comments on commit cb42029

Please sign in to comment.