mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
TID251 bans typing.cast, so say why this one is allowed
ruff_strict_gate counts TID251 against the merge-base and the new cast import put the file one over. The config's own note for that rule allows a suppression with a reason, and the reasoning is narrow: response_format reaches us as an arbitrary JSON object from the provider, and the branch immediately reads one key off it and compares against three literal strings. The stricter alternative in the rule's message is a pydantic boundary model. That would be the right call if these values were persisted or forwarded to a caller, and it is not here. strict-rule counts now match the merge-base exactly. 164 tests pass and the type-discipline and test-quality gates stay within their ceilings.
This commit is contained in:
parent
eafae88742
commit
daf51cc878
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ import time
|
|||
import uuid
|
||||
from collections.abc import AsyncIterator, Iterator, Mapping, Sequence
|
||||
from types import MappingProxyType
|
||||
from typing import TYPE_CHECKING, Any, Final, cast
|
||||
from typing import TYPE_CHECKING, Any, Final, cast # noqa: TID251 # response_format is a plain JSON object
|
||||
|
||||
import httpx
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue