mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-31 11:16:54 +00:00
Merge branch 'fix/disable_noqa' into 'master'
`--disable-noqa` does not override `# flake8: noqa` Closes #590 See merge request pycqa/flake8!380
This commit is contained in:
commit
21d2adf21f
3 changed files with 15 additions and 1 deletions
|
|
@ -346,7 +346,10 @@ class FileProcessor(object):
|
|||
:rtype:
|
||||
bool
|
||||
"""
|
||||
if any(defaults.NOQA_FILE.match(line) for line in self.lines):
|
||||
if (
|
||||
not self.options.disable_noqa
|
||||
and any(defaults.NOQA_FILE.match(line) for line in self.lines)
|
||||
):
|
||||
return True
|
||||
elif any(defaults.NOQA_FILE.search(line) for line in self.lines):
|
||||
LOG.warning(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue