application: Inline creation of config.ConfigFileFinder

Simplify the initialization code path by invoking
`config.ConfigFileFinder` directly instead of the extra hop by calling
the static class-level `Application.make_config_finder()` method.
This commit is contained in:
Eric N. Vander Weele 2019-12-01 11:59:12 -06:00
parent 21d2adf21f
commit 9fa5663986
4 changed files with 13 additions and 28 deletions

View file

@ -346,9 +346,8 @@ class FileProcessor(object):
:rtype:
bool
"""
if (
not self.options.disable_noqa
and 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):