File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -38,16 +38,15 @@ def read_cfg(filepath: str | None = None) -> BaseConfig:
3838 config_candidates = list (_resolve_config_paths (filepath ))
3939
4040 # Check for multiple config files and warn the user
41- if filepath is None :
42- config_candidates_exclude_pyproject = [
43- path for path in config_candidates if path .name != "pyproject.toml"
44- ]
45- if len (config_candidates_exclude_pyproject ) > 1 :
46- filenames = [path .name for path in config_candidates_exclude_pyproject ]
47- out .warn (
48- f"Multiple config files detected: { ', ' .join (filenames )} . "
49- f"Using config file: '{ filenames [0 ]} '."
50- )
41+ config_candidates_exclude_pyproject = [
42+ path for path in config_candidates if path .name != "pyproject.toml"
43+ ]
44+ if len (config_candidates_exclude_pyproject ) > 1 :
45+ filenames = [path .name for path in config_candidates_exclude_pyproject ]
46+ out .warn (
47+ f"Multiple config files detected: { ', ' .join (filenames )} . "
48+ f"Using config file: '{ filenames [0 ]} '."
49+ )
5150
5251 for filename in config_candidates :
5352 with open (filename , "rb" ) as f :
You can’t perform that action at this time.
0 commit comments