From 00913a4764e1db5d7a41ce11f0efd1f701849e4f Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Wed, 11 Mar 2026 08:13:55 +0100 Subject: [PATCH 1/2] LCORE-1449: Use proper type specification in LCORE sources --- src/utils/types.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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): From b86cf645c197831cc35b3f522e13f779e3153d3f Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Wed, 11 Mar 2026 08:14:10 +0100 Subject: [PATCH 2/2] Check can be done on CI --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" }