From dd411e95bcb52e3e85c028bc0d1f5158658fc19b Mon Sep 17 00:00:00 2001 From: Byeonghoon Yoo Date: Tue, 5 Nov 2019 21:59:19 +0900 Subject: [PATCH] Fix should_ignore_file() to handle disable-noqa configuration --- src/flake8/processor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flake8/processor.py b/src/flake8/processor.py index 3ee6dfa..1253e7a 100644 --- a/src/flake8/processor.py +++ b/src/flake8/processor.py @@ -349,7 +349,7 @@ class FileProcessor(object): :rtype: bool """ - if any(defaults.NOQA_FILE.match(line) for line in self.lines): + if not self.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(