Skip to content

Commit 1efbba4

Browse files
authored
Merge pull request lightspeed-core#1307 from tisnik/use-proper-type-specification
LCORE-1449: Use proper type specification
2 parents bcda784 + b86cf64 commit 1efbba4

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ disable = ["R0801"]
223223
extend-exclude = ["tests/profiles/syntax_error.py"]
224224

225225
[tool.ruff.lint]
226-
extend-select = ["TID251", "UP006", "UP007", "UP017", "UP035", "RUF100", "B009", "B010"]
226+
extend-select = ["TID251", "UP006", "UP007", "UP010", "UP017", "UP035", "RUF100", "B009", "B010"]
227227

228228
[tool.ruff.lint.flake8-tidy-imports.banned-api]
229229
unittest = { msg = "use pytest instead of unittest" }

src/utils/types.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Common types for the project."""
22

3-
from typing import Annotated, Any, Literal, Optional, TypeAlias
3+
from typing import Annotated, Any, Literal, Optional
44

55
from llama_stack_api import ImageContentItem, TextContentItem
66
from llama_stack_api.openai_responses import (
@@ -131,7 +131,7 @@ class ShieldModerationBlocked(BaseModel):
131131
Field(discriminator="decision"),
132132
]
133133

134-
IncludeParameter: TypeAlias = Literal[
134+
type IncludeParameter = Literal[
135135
"web_search_call.action.sources",
136136
"code_interpreter_call.outputs",
137137
"computer_call_output.output.image_url",
@@ -141,7 +141,7 @@ class ShieldModerationBlocked(BaseModel):
141141
"reasoning.encrypted_content",
142142
]
143143

144-
ResponseItem: TypeAlias = (
144+
type ResponseItem = (
145145
ResponseMessage
146146
| WebSearchToolCall
147147
| FileSearchToolCall
@@ -153,7 +153,7 @@ class ShieldModerationBlocked(BaseModel):
153153
| McpApprovalResponse
154154
)
155155

156-
ResponseInput: TypeAlias = str | list[ResponseItem]
156+
type ResponseInput = str | list[ResponseItem]
157157

158158

159159
class ResponsesApiParams(BaseModel):

0 commit comments

Comments
 (0)