mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 04:56:54 +00:00
Only skip a file if # flake8: noqa is on a line by itself
This commit is contained in:
parent
eb6228b660
commit
e73055432c
2 changed files with 13 additions and 4 deletions
|
|
@ -46,6 +46,7 @@ def test_strip_utf_bom(first_line):
|
|||
(['#!/usr/bin/python', '# flake8: noqa', 'a = 1'], True),
|
||||
(['# flake8: noqa', '#!/usr/bin/python', 'a = 1'], True),
|
||||
(['#!/usr/bin/python', 'a = 1', '# flake8: noqa'], True),
|
||||
(['#!/usr/bin/python', 'a = 1 # flake8: noqa'], False),
|
||||
])
|
||||
def test_should_ignore_file(lines, expected):
|
||||
"""Verify that we ignore a file if told to."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue