diff --git a/pyproject.toml b/pyproject.toml index 8e65536a0..253e607ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -223,7 +223,7 @@ disable = ["R0801"] extend-exclude = ["tests/profiles/syntax_error.py"] [tool.ruff.lint] -extend-select = ["TID251", "UP006", "UP007", "UP017", "UP035", "RUF100", "B009", "B010"] +extend-select = ["TID251", "UP006", "UP007", "UP010", "UP017", "UP035", "RUF100", "B009", "B010"] [tool.ruff.lint.flake8-tidy-imports.banned-api] unittest = { msg = "use pytest instead of unittest" } diff --git a/src/utils/types.py b/src/utils/types.py index 8b0e618ca..4a725fd5e 100644 --- a/src/utils/types.py +++ b/src/utils/types.py @@ -1,6 +1,6 @@ """Common types for the project.""" -from typing import Annotated, Any, Literal, Optional, TypeAlias +from typing import Annotated, Any, Literal, Optional from llama_stack_api import ImageContentItem, TextContentItem from llama_stack_api.openai_responses import ( @@ -131,7 +131,7 @@ class ShieldModerationBlocked(BaseModel): Field(discriminator="decision"), ] -IncludeParameter: TypeAlias = Literal[ +type IncludeParameter = Literal[ "web_search_call.action.sources", "code_interpreter_call.outputs", "computer_call_output.output.image_url", @@ -141,7 +141,7 @@ class ShieldModerationBlocked(BaseModel): "reasoning.encrypted_content", ] -ResponseItem: TypeAlias = ( +type ResponseItem = ( ResponseMessage | WebSearchToolCall | FileSearchToolCall @@ -153,7 +153,7 @@ class ShieldModerationBlocked(BaseModel): | McpApprovalResponse ) -ResponseInput: TypeAlias = str | list[ResponseItem] +type ResponseInput = str | list[ResponseItem] class ResponsesApiParams(BaseModel):