[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-05-25 07:01:29 +00:00
commit 2f9bb6929e
2 changed files with 9 additions and 8 deletions

View file

@ -375,12 +375,15 @@ def detect_family(
# ``qwenimage-gguf`` -> qwenimage-compact in needle_compact.
# Use word boundary on the compact form too: the compact
# ``flux2`` must not match inside ``flux20``.
return bool(
re.search(
rf"(^|[^0-9a-z]){re.escape(term_compact)}([^0-9a-z]|$)",
needle_compact,
return (
bool(
re.search(
rf"(^|[^0-9a-z]){re.escape(term_compact)}([^0-9a-z]|$)",
needle_compact,
)
)
) or term_compact == needle_compact
or term_compact == needle_compact
)
return False
# Scan _FAMILIES first (GGUF-supported), then _FULL_REPO_FAMILIES

View file

@ -1455,9 +1455,7 @@ import re as _re
_EMBEDDED_HF_TOKEN_RE = _re.compile(r"hf_[A-Za-z0-9]{20,}")
def _reject_embedded_hf_token(
value: Optional[str], field_name: str
) -> Optional[str]:
def _reject_embedded_hf_token(value: Optional[str], field_name: str) -> Optional[str]:
"""Refuse identifiers that contain an embedded ``hf_xxx`` token.
Round 15 P1 #5: ``repo_id`` and ``base_repo`` accept URL-style