Skip to content

Commit 31cb292

Browse files
authored
Merge pull request #1286 from tisnik/lcore-1430-fixed-new-linter-errors
LCORE-1430: fixed new linter errors
2 parents b727deb + f8c83fb commit 31cb292

3 files changed

Lines changed: 6 additions & 6 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", "RUF100"]
226+
extend-select = ["TID251", "UP006", "UP007", "RUF100"]
227227

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

src/models/responses.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
"""Models for REST API responses."""
44

5-
from typing import Any, ClassVar, Literal, Optional, Union
5+
from typing import Any, ClassVar, Literal, Optional
66

77
from fastapi import status
88
from llama_stack_api.openai_responses import (
@@ -318,11 +318,11 @@ class ProviderResponse(AbstractSuccessfulResponse):
318318
...,
319319
description="The API this provider implements",
320320
)
321-
config: dict[str, Union[bool, float, str, list[Any], object, None]] = Field(
321+
config: dict[str, bool | float | str | list[Any] | object | None] = Field(
322322
...,
323323
description="Provider configuration parameters",
324324
)
325-
health: dict[str, Union[bool, float, str, list[Any], object, None]] = Field(
325+
health: dict[str, bool | float | str | list[Any] | object | None] = Field(
326326
...,
327327
description="Current health status of the provider",
328328
)

src/utils/conversations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import json
44
from datetime import UTC, datetime
5-
from typing import Any, Optional, Union, cast
5+
from typing import Any, Optional, cast
66

77
from llama_stack_api.openai_responses import (
88
OpenAIResponseOutputMessageFileSearchToolCall as FileSearchCall,
@@ -26,7 +26,7 @@
2626
from utils.types import ToolCallSummary, ToolResultSummary
2727

2828

29-
def _extract_text_from_content(content: Union[str, list[Any]]) -> str:
29+
def _extract_text_from_content(content: str | list[Any]) -> str:
3030
"""Extract text content from message content.
3131
3232
Args:

0 commit comments

Comments
 (0)