disable-next
leaks into the whole block if it's followed by an empty line
#7401
Labels
Bug 🪲
C: Pragma's
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
Milestone
Bug description
virtualenv pylint-repro
). pylint-repro/bin/activate
pip install pylint
)example.py
file:pylint example.py
Configuration
No response
Command used
Pylint output
Expected behavior
I expected the second unused variable to be reported, as is the case when not putting an empty line between
disable-next
and the line I'm suppressing errors for:Example output:
It probably would also be fine if an empty line between the comment and line to suppress simply didn't work. My issue is that this appears to do what I've intended - it suppresses the unused variable for next line - but it also does things it wasn't supposed to.
Pylint version
OS / Environment
Ubuntu 22.04.1, Python 3.10 shipped with the system
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: