Skip to content

Commit cbba053

Browse files
[executors] fix: add python3.9 and 3.10 type hints to ApiExecutorRequest
1 parent dca5673 commit cbba053

File tree

1 file changed

+5
-3
lines changed
  • libs/executors/garf_executors/entrypoints

1 file changed

+5
-3
lines changed

libs/executors/garf_executors/entrypoints/server.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
"""FastAPI endpoint for executing queries."""
1616

17+
from typing import Optional, Union
18+
1719
import fastapi
1820
import pydantic
1921
import uvicorn
@@ -35,9 +37,9 @@ class ApiExecutorRequest(pydantic.BaseModel):
3537
"""
3638

3739
source: str
38-
title: str | None = None
39-
query: str | None = None
40-
query_path: str | list[str] | None = None
40+
title: Optional[str] = None
41+
query: Optional[str] = None
42+
query_path: Optional[Union[str, list[str]]] = None
4143
context: garf_executors.ApiExecutionContext
4244

4345
@pydantic.model_validator(mode='after')

0 commit comments

Comments
 (0)