@@ -297,6 +297,7 @@ def from_file(self, filename: str, warn: Callable[[str], None], our_file: bool)
297
297
files_read = cp .read (filename )
298
298
except (configparser .Error , TomlDecodeError ) as err :
299
299
raise ConfigError (f"Couldn't read config file { filename } : { err } " ) from err
300
+ print (f"{ files_read = } " )
300
301
if not files_read :
301
302
return False
302
303
@@ -308,6 +309,7 @@ def from_file(self, filename: str, warn: Callable[[str], None], our_file: bool)
308
309
was_set = self ._set_attr_from_config_option (cp , * option_spec )
309
310
if was_set :
310
311
any_set = True
312
+ print (f"{ any_set = } because { option_spec = } " )
311
313
except ValueError as err :
312
314
raise ConfigError (f"Couldn't read config file { filename } : { err } " ) from err
313
315
@@ -332,20 +334,24 @@ def from_file(self, filename: str, warn: Callable[[str], None], our_file: bool)
332
334
for option in cp .options ('paths' ):
333
335
self .paths [option ] = cp .getlist ('paths' , option )
334
336
any_set = True
337
+ print (f"{ any_set = } because paths:{ option } " )
335
338
336
339
# plugins can have options
337
340
for plugin in self .plugins :
338
341
if cp .has_section (plugin ):
339
342
self .plugin_options [plugin ] = cp .get_section (plugin )
340
343
any_set = True
344
+ print (f"{ any_set = } because { plugin = } :{ option } " )
341
345
342
346
# Was this file used as a config file? If it's specifically our file,
343
347
# then it was used. If we're piggybacking on someone else's file,
344
348
# then it was only used if we found some settings in it.
349
+ print (f"{ our_file = } " )
345
350
if our_file :
346
351
used = True
347
352
else :
348
353
used = any_set
354
+ print (f"{ used = } " )
349
355
350
356
if used :
351
357
self .config_file = os .path .abspath (filename )
@@ -591,7 +597,9 @@ def read_coverage_config(
591
597
files_to_try = config_files_to_try (config_file )
592
598
593
599
for fname , our_file , specified_file in files_to_try :
600
+ print (f"Reading { fname = } " )
594
601
config_read = config .from_file (fname , warn , our_file = our_file )
602
+ print (f"{ config_read = } " )
595
603
if config_read :
596
604
break
597
605
if specified_file :
0 commit comments