mirror of
https://github.com/tiennm99/litellm.git
synced 2026-06-17 18:48:36 +00:00
083c8998e6
* fix: add return type annotations to iterator protocol methods in streaming_handler Add missing return type annotations to __iter__, __aiter__, __next__, and __anext__ methods in CustomStreamWrapper and related classes. - __iter__(self) -> Iterator["ModelResponseStream"] - __aiter__(self) -> AsyncIterator["ModelResponseStream"] - __next__(self) -> "ModelResponseStream" - __anext__(self) -> "ModelResponseStream" Also adds AsyncIterator and Iterator to typing imports. Fixes issue with PLR0915 noqa comments and ensures proper type checking support. Related to: BerriAI/litellm#8304 * fix: add ruff PLR0915 noqa for files with too many statements
19 lines
832 B
TOML
19 lines
832 B
TOML
lint.ignore = ["F405", "E402", "E501", "F403"]
|
|
lint.extend-select = ["E501", "PLR0915", "T20"]
|
|
line-length = 120
|
|
exclude = ["litellm/types/*", "litellm/__init__.py", "litellm/proxy/example_config_yaml/*", "tests/*"]
|
|
|
|
|
|
[lint.per-file-ignores]
|
|
"litellm/main.py" = ["F401"]
|
|
"litellm/utils.py" = ["F401"]
|
|
"litellm/proxy/proxy_server.py" = ["F401"]
|
|
"litellm/caching/__init__.py" = ["F401"]
|
|
"litellm/llms/anthropic/chat/__init__.py" = ["F401"]
|
|
"litellm/llms/azure_ai/embed/__init__.py" = ["F401"]
|
|
"litellm/llms/azure_ai/rerank/__init__.py" = ["F401"]
|
|
"litellm/llms/bedrock/chat/__init__.py" = ["F401"]
|
|
"litellm/proxy/utils.py" = ["F401", "PLR0915"]
|
|
"litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/content_filter.py" = ["PLR0915"]
|
|
"litellm/proxy/guardrails/guardrail_hooks/guardrail_benchmarks/test_eval.py" = ["PLR0915"]
|