File tree Expand file tree Collapse file tree 1 file changed +4
-20
lines changed
Expand file tree Collapse file tree 1 file changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -55,26 +55,10 @@ def _check_and_warn_multiple_configs(filepath: str | None = None) -> None:
5555
5656 # If more than one config file exists, warn the user
5757 if len (existing_files ) > 1 :
58- # Find which one will be used (first non-empty one in the priority order)
59- used_config = None
60- for filename in defaults .CONFIG_FILES :
61- config_path = path / filename
62- if config_path .exists ():
63- try :
64- with open (config_path , "rb" ) as f :
65- data = f .read ()
66- conf = create_config (data = data , path = config_path )
67- if not conf .is_empty_config :
68- used_config = filename
69- break
70- except Exception :
71- continue
72-
73- if used_config :
74- out .warn (
75- f"Multiple config files detected: { ', ' .join (existing_files )} . "
76- f"Using { used_config } ."
77- )
58+ out .warn (
59+ f"Multiple config files detected: { ', ' .join (existing_files )} . "
60+ f"Using { existing_files [0 ]} ."
61+ )
7862 break
7963
8064
You can’t perform that action at this time.
0 commit comments