[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 05:57:48 +00:00
commit ff98c6d160
2 changed files with 3 additions and 9 deletions

View file

@ -200,9 +200,7 @@ def _resolve_local_gguf_child(repo_root: Path, gguf_filename: str) -> Path:
invariant for Hub repos.
"""
if Path(gguf_filename).is_absolute() or "\\" in gguf_filename:
raise RuntimeError(
"gguf_filename must be a relative file path inside repo_id."
)
raise RuntimeError("gguf_filename must be a relative file path inside repo_id.")
rel = PurePosixPath(gguf_filename)
if any(part in ("", ".", "..") for part in rel.parts):
raise RuntimeError(

View file

@ -2721,14 +2721,10 @@ class LlamaCppBackend:
)
elif gguf_path:
if not Path(gguf_path).is_file():
raise FileNotFoundError(
f"GGUF file not found: {gguf_path}"
)
raise FileNotFoundError(f"GGUF file not found: {gguf_path}")
model_path = gguf_path
else:
raise ValueError(
"Either gguf_path or hf_repo must be provided"
)
raise ValueError("Either gguf_path or hf_repo must be provided")
finally:
self._loading_model_identifier = None