mirror of
https://github.com/astral-sh/uv
synced 2026-06-21 13:47:25 +00:00
fix: Use 3.9 compatible zip (#15177)
<!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary Uses a <3.10-compatible version of `zip` since the `strict` argument was [added in 3.10](https://docs.python.org/3.10/library/functions.html#zip) ## Test Plan I executed the `_matching_parents` function in a local 3.9 environment --------- Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
@@ -76,8 +76,10 @@ def _matching_parents(path: str | None, match: str) -> str | None:
|
||||
|
||||
if not all(
|
||||
fnmatch(part, match_part)
|
||||
for part, match_part in zip(
|
||||
reversed(parts), reversed(match_parts), strict=False
|
||||
for part, match_part in (
|
||||
zip(reversed(parts), reversed(match_parts), strict=False)
|
||||
if sys.version_info >= (3, 10)
|
||||
else zip(reversed(parts), reversed(match_parts)) # noqa: B905
|
||||
)
|
||||
):
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user