Closed
Description
Bug
When the from devtools import debug
statement occurs within a method (as opposed to at toplevel of the module), an "error parsing code" message is printed.
Min repro:
The following works as expected:
# tmp.py
from devtools import debug
def foo():
debug(123)
foo()
$ python tmp.py
tmp.py:4 foo
123 (int)
But if you put the import statement inside the method, there is an error:
# tmp2.py
def foo():
from devtools import debug
debug(123)
foo()
$ python tmp2.py
tmp2.py:4 foo (error parsing code, unable to find "debug" function statement)
123 (int)
Metadata
Metadata
Assignees
Labels
No labels