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
This is perfectly valid Python: if you run it, it'll print 42.
flake8 emits a F821: undefined name 'int' on the penultimate line. I think it's because of the del int.
For a real-world example of this situation, consider a project that uses gettext and installs _ in builtins, but doesn't do that early enough to be available at import time of every module. Here's how linkchecker copes with that situation:
./linkcheck/logger/__init__.py:278:19: F821 undefined name '_'
./linkcheck/logger/__init__.py:340:16: F821 undefined name '_'
./linkcheck/logger/__init__.py:377:22: F821 undefined name '_'
./linkcheck/logger/__init__.py:380:22: F821 undefined name '_'
./linkcheck/logger/__init__.py:382:22: F821 undefined name '_'
./linkcheck/logger/__init__.py:390:22: F821 undefined name '_'
flake8 --version reports
3.8.2 (flake8_2020: 1.6.0, mccabe: 0.6.1, pycodestyle: 2.6.0, pyflakes: 2.2.0) CPython 3.8.2 on Linux
The text was updated successfully, but these errors were encountered:
Consider this silly code:
This is perfectly valid Python: if you run it, it'll print 42.
flake8 emits a
F821: undefined name 'int'
on the penultimate line. I think it's because of thedel int
.For a real-world example of this situation, consider a project that uses gettext and installs
_
in builtins, but doesn't do that early enough to be available at import time of every module. Here's how linkchecker copes with that situation:and this then causes flake8 to complain about
_()
being used elsewhere in the file:flake8 --version reports
The text was updated successfully, but these errors were encountered: