Update the target Python version for Ruff to 3.7 in the uv module (#15183)

This fixes our Ruff target Python version for our Python module, which
avoids it enforcing things that break compatibility like
https://github.com/astral-sh/uv/issues/15176

---------

Co-authored-by: arielle <me@arielle.codes>
This commit is contained in:
Zanie Blue 2025-08-08 19:23:08 -05:00 committed by GitHub
parent 9a54754b0a
commit 66c1c0d24c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

2
python/ruff.toml Normal file
View file

@ -0,0 +1,2 @@
# It is important to retain compatibility here.
target-version = "py37"

View file

@ -76,11 +76,7 @@ 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)
if sys.version_info >= (3, 10)
else zip(reversed(parts), reversed(match_parts)) # noqa: B905
)
for part, match_part in zip(reversed(parts), reversed(match_parts))
):
return None