mirror of https://github.com/razor-ai/soup.git
fix: Python 3.9 compat — replace str | None with Optional[str] in serve.py
The `str | None` union syntax at module level requires Python 3.10+. serve.py cannot use `from __future__ import annotations` because it defines Pydantic models inside functions (FastAPI needs runtime types).
This commit is contained in:
parent
dee9317dde
commit
f3c2dda9f2
|
|
@ -24,7 +24,7 @@ def _validate_adapter_name(name: str) -> bool:
|
|||
return bool(re.match(r'^[a-zA-Z0-9][a-zA-Z0-9\-]*$', name))
|
||||
|
||||
|
||||
def _validate_adapter_path(path: str, cwd: str | None = None) -> bool:
|
||||
def _validate_adapter_path(path: str, cwd: Optional[str] = None) -> bool:
|
||||
"""Validate adapter path: must exist and stay under cwd."""
|
||||
if cwd is None:
|
||||
cwd = str(Path.cwd())
|
||||
|
|
|
|||
Loading…
Reference in New Issue