diff options
| author | Anthony Sottile <asottile@umich.edu> | 2020-01-13 05:31:57 +0000 |
|---|---|---|
| committer | Anthony Sottile <asottile@umich.edu> | 2020-01-13 05:31:57 +0000 |
| commit | b56c88fe654af09161a66bf81e00481fa5d2d8c5 (patch) | |
| tree | b78f9607faac7419731829536970f402b7405ce2 /src/flake8 | |
| parent | 44d67e46f5ebe6bc458fe7b18a7b8821e7b2391e (diff) | |
| parent | eb6698c420bc62e4069377f8112c96893d30dd85 (diff) | |
| download | flake8-b56c88fe654af09161a66bf81e00481fa5d2d8c5.tar.gz | |
Merge branch 'config-finder-extra-files-optional' into 'master'
config: Make ConfigFileFinder 'extra_config_files' parameter optional
See merge request pycqa/flake8!402
Diffstat (limited to 'src/flake8')
| -rw-r--r-- | src/flake8/options/config.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/flake8/options/config.py b/src/flake8/options/config.py index af163ca..ed8c096 100644 --- a/src/flake8/options/config.py +++ b/src/flake8/options/config.py @@ -19,11 +19,11 @@ class ConfigFileFinder(object): def __init__( self, program_name, - extra_config_files, + extra_config_files=None, config_file=None, ignore_config_files=False, ): - # type: (str, List[str], Optional[str], bool) -> None + # type: (str, Optional[List[str]], Optional[str], bool) -> None """Initialize object to find config files. :param str program_name: @@ -36,7 +36,8 @@ class ConfigFileFinder(object): Determine whether to ignore configuration files or not. """ # The values of --append-config from the CLI - extra_config_files = extra_config_files or [] + if extra_config_files is None: + extra_config_files = [] self.extra_config_files = utils.normalize_paths(extra_config_files) # The value of --config from the CLI. |
