Skip to content

Commit b9e971b

Browse files
authored
Merge pull request #1297 from tisnik/lcore-1437-b010-linter-rule
LCORE-1437: Enable linter rule B010
2 parents 841d1ad + 3f1c3c9 commit b9e971b

2 files changed

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

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

src/app/endpoints/streaming_query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ async def response_generator( # pylint: disable=too-many-branches,too-many-stat
698698
# Completed response - capture final text and response object
699699
elif event_type == "response.completed":
700700
latest_response_object = cast(
701-
OpenAIResponseObject, getattr(chunk, "response")
701+
OpenAIResponseObject, getattr(chunk, "response") # noqa: B009
702702
)
703703
turn_summary.llm_response = turn_summary.llm_response or "".join(text_parts)
704704
yield stream_event(
@@ -714,7 +714,7 @@ async def response_generator( # pylint: disable=too-many-branches,too-many-stat
714714
# Incomplete or failed response - emit error
715715
elif event_type in ("response.incomplete", "response.failed"):
716716
latest_response_object = cast(
717-
OpenAIResponseObject, getattr(chunk, "response")
717+
OpenAIResponseObject, getattr(chunk, "response") # noqa: B009
718718
)
719719
error_message = (
720720
latest_response_object.error.message

0 commit comments

Comments
 (0)