Files
litellm/ruff.toml
T
Cursor Agent ba8fed7fc8 refactor: extract _list_tools_for_single_server helper to fix PLR0915
Extract the single-server branch of list_tool_rest_api into a dedicated
helper function _list_tools_for_single_server. This reduces the statement
count in list_tool_rest_api from 57 to under 50, resolving the PLR0915
ruff lint error without needing a per-file-ignore.

The behavior is unchanged — all validation, IP-filtering, error handling,
and tool-fetching logic is preserved identically in the extracted helper.

Co-authored-by: yuneng-jiang <yuneng-jiang@users.noreply.github.com>
2026-03-12 20:06:10 +00:00

21 lines
926 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"]
"litellm/responses/streaming_iterator.py" = ["PLR0915"]
"litellm/files/main.py" = ["PLR0915"]