forked from Imagelibrary/littlefs
scripts: Adopted del to resolve shadowed builtins
So: all_ = all; del all Instead of: import builtins all_, all = all, builtins.all The del exposes the globally scoped builtin we accidentally shadow. This requires less megic, and no module imports, though tbh I'm surprised it works. It also works in the case where you change a builtin globally, but that's a bit too crazy even for me...
This commit is contained in:
@@ -607,8 +607,7 @@ def table(Result, results, diff_results=None, *,
|
||||
small_table=False,
|
||||
summary=False,
|
||||
**_):
|
||||
import builtins
|
||||
all_, all = all, builtins.all
|
||||
all_ = all; del all
|
||||
|
||||
if by is None:
|
||||
by = Result._by
|
||||
|
||||
Reference in New Issue
Block a user