diff --git a/src/tox/config/source/discover.py b/src/tox/config/source/discover.py index 84348c4f6..f04b9a7a0 100644 --- a/src/tox/config/source/discover.py +++ b/src/tox/config/source/discover.py @@ -68,7 +68,7 @@ def _locate_source() -> Source | None: def _load_exact_source(config_file: Path) -> Source: # if the filename matches to the letter some config file name do not fallback to other source types - exact_match = list(s for s in SOURCE_TYPES if config_file.name == s.FILENAME) # pragma: no cover + exact_match = [s for s in SOURCE_TYPES if config_file.name == s.FILENAME] # pragma: no cover for src_type in exact_match or SOURCE_TYPES: # pragma: no branch try: return src_type(config_file)