mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 13:06:53 +00:00
Fix handling of logical lines with noqa
When attempting to centralize all inline NoQA handling in the StyleGuide we inadvertently broke plugins relying on it in combination with checker state. For example, the check for E402 relies both on NoQA and the state to determine if it has seen a non-import line. Placing NoQA on the sole line that is not an import is more elegant than placing it on each of the following import lines. Closes #186
This commit is contained in:
parent
6eca38f2f2
commit
e51fc5458b
5 changed files with 33 additions and 24 deletions
4
setup.py
4
setup.py
|
|
@ -7,9 +7,9 @@ import sys
|
|||
|
||||
import setuptools
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src')) # noqa
|
||||
|
||||
import flake8 # noqa
|
||||
import flake8
|
||||
|
||||
|
||||
tests_require = ['mock', 'pytest']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue