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:
Eric N. Vander Weele 2019-11-02 17:33:28 +00:00
commit 243e877e67

View file

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