File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1+ multiple source_type supports for the same filename. Like pyproject.toml can be load by both TomlPyProject & LegacyToml
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ def _locate_source() -> Source | None:
6868
6969def _load_exact_source (config_file : Path ) -> Source :
7070 # if the filename matches to the letter some config file name do not fallback to other source types
71- exact_match = next (( s for s in SOURCE_TYPES if config_file .name == s .FILENAME ), None ) # pragma: no cover
72- for src_type in ( exact_match ,) if exact_match is not None else SOURCE_TYPES : # pragma: no branch
71+ exact_match = list ( s for s in SOURCE_TYPES if config_file .name == s .FILENAME ) # pragma: no cover
72+ for src_type in exact_match or SOURCE_TYPES : # pragma: no branch
7373 try :
7474 return src_type (config_file )
7575 except ValueError : # noqa: PERF203
You can’t perform that action at this time.
0 commit comments