File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -423,8 +423,21 @@ def parse_options(args):
423423 with open (toml_file , 'rb' ) as f :
424424 data = tomli .load (f ).get ('tool' , {})
425425 config .read_dict (data )
426- config .read (cfg_files )
427426
427+ # Report which config files are going to be used
428+ used_cfg_files = []
429+ for cfg_file in cfg_files :
430+ _cfg = configparser .ConfigParser ()
431+ _cfg .read (cfg_file )
432+ if _cfg .has_section ('codespell' ):
433+ used_cfg_files .append (cfg_file )
434+ if len (used_cfg_files ) > 0 :
435+ print ('Used config files:\n ' )
436+ for ifile , cfg_file in enumerate (used_cfg_files ):
437+ print (' %i : %s' % (ifile , cfg_file ))
438+
439+ # Use config files
440+ config .read (cfg_files )
428441 if config .has_section ('codespell' ):
429442 # Build a "fake" argv list using option name and value.
430443 cfg_args = []
You can’t perform that action at this time.
0 commit comments