From 1050f89831099c1c425798b60251456932e7274c Mon Sep 17 00:00:00 2001 From: Yongtao Huang Date: Thu, 24 Jul 2025 22:18:33 +0800 Subject: [PATCH] Remove unused func `_as_path` --- ollama/_client.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ollama/_client.py b/ollama/_client.py index 4555a939..2b824ba4 100644 --- a/ollama/_client.py +++ b/ollama/_client.py @@ -1160,16 +1160,6 @@ def _copy_tools(tools: Optional[Sequence[Union[Mapping[str, Any], Tool, Callable yield convert_function_to_tool(unprocessed_tool) if callable(unprocessed_tool) else Tool.model_validate(unprocessed_tool) -def _as_path(s: Optional[Union[str, PathLike]]) -> Union[Path, None]: - if isinstance(s, (str, Path)): - try: - if (p := Path(s)).exists(): - return p - except Exception: - ... - return None - - def _parse_host(host: Optional[str]) -> str: """ >>> _parse_host(None)