Merge branch 'application-make-config' into 'master'

application: Simplify creation of configuration file finder

See merge request pycqa/flake8!373
This commit is contained in:
Anthony Sottile 2019-11-03 01:09:08 +00:00
commit 79c221a3e3

View file

@ -133,17 +133,17 @@ class Application(object):
(self.result_count > 0) or self.catastrophic_failure
)
def make_config_finder(self, append_config):
def make_config_finder(self, extra_config_files):
# type: (List[str]) -> None
"""Make our ConfigFileFinder based on preliminary opts and args.
"""Make our ConfigFileFinder based on preliminary options.
:param list append_config:
List of configuration files to be parsed for configuration.
:param list extra_config_files:
List of addtional configuration files to be parsed for
configuration.
"""
if self.config_finder is None:
self.config_finder = config.ConfigFileFinder(
self.option_manager.program_name, append_config
)
self.config_finder = config.ConfigFileFinder(
self.program, extra_config_files
)
def find_plugins(self, config_file, ignore_config_files):
# type: (Optional[str], bool) -> None