[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
7b5fe1cf10
commit
4785f76fa2
1 changed files with 2 additions and 6 deletions
|
|
@ -2826,14 +2826,10 @@ async def delete_cached_model(
|
|||
)
|
||||
raise HTTPException(
|
||||
status_code = 503,
|
||||
detail = (
|
||||
"Could not verify cache ownership before deleting. Try again."
|
||||
),
|
||||
detail = ("Could not verify cache ownership before deleting. Try again."),
|
||||
) from cache_scan_exc
|
||||
|
||||
def _owned_cache_path_matches(
|
||||
value: Optional[str], roots: list[Path]
|
||||
) -> bool:
|
||||
def _owned_cache_path_matches(value: Optional[str], roots: list[Path]) -> bool:
|
||||
"""Return True if ``value`` resolves to (or contains, or is a
|
||||
child of) any of the HF cache repo roots for the target repo.
|
||||
Used by the llama / safetensors guards to catch local snapshot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue