You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flake8 emits F401 errors for imports which are not explictly used but accessed through calls to locals().
This is not the case for variables: F841 is not emitted when a variable is in the same scope as a locals() call.
I would expect a call to locals() to remove the F401 error.
In GitLab by @fbessou on Oct 7, 2019, 02:47
Please describe how you installed Flake8
Please provide the exact, unmodified output of
flake8 --bug-report
Please describe the problem or feature
Flake8 emits F401 errors for imports which are not explictly used but accessed through calls to
locals()
.This is not the case for variables: F841 is not emitted when a variable is in the same scope as a
locals()
call.I would expect a call to
locals()
to remove the F401 error.Here is what I would like to achieve:
Examples
emits
No error is emitted for variables which are only accessed through
locals
:The text was updated successfully, but these errors were encountered: