mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
39 lines
2 KiB
TOML
39 lines
2 KiB
TOML
lint.ignore = ["F405", "E402", "F403"]
|
|
lint.extend-select = ["T20", "PGH004", "RUF008", "RUF009", "RUF100"]
|
|
# RUF100 (unused-noqa) only knows the rules enabled in THIS config, so it would strip
|
|
# `# noqa` directives that protect rules enforced elsewhere. List those codes as external
|
|
# so RUF100 leaves their directives alone: the strict gate (ruff-strict.toml) and upstream
|
|
# litellm's own ruff config both rely on suppressions this config can't see.
|
|
lint.external = [
|
|
# Enforced by the strict-rule gate (scripts/ruff_strict_gate.py + ruff-strict.toml)
|
|
"ANN", "ASYNC230", "B", "C", "D419", "DTZ", "EXE", "FURB", "I001", "LOG015", "N999", "PERF",
|
|
"PIE", "PL", "PYI", "RET", "RUF010", "RUF012", "RUF015", "RUF019", "RUF022", "RUF023",
|
|
"RUF046", "RUF051", "RUF059", "S110", "S112", "SIM", "TC", "TID251", "TRY", "UP",
|
|
# Enforced by upstream litellm's ruff config, but not run in this repo's CI
|
|
"PLC0415", "E402", "BLE001", "ARG002", "S102", "S324", "S606", "D401", "F403", "F405",
|
|
]
|
|
line-length = 120
|
|
|
|
format.exclude = ["**/enterprise/**"]
|
|
|
|
# Was the top-level `exclude`. Scoped to lint so `ruff format` still formats these paths
|
|
# (Black did) while `ruff check` keeps skipping them.
|
|
lint.exclude = ["litellm/__init__.py", "litellm/proxy/example_config_yaml/*", "tests/*"]
|
|
|
|
|
|
[lint.per-file-ignores]
|
|
"litellm/main.py" = ["F401"]
|
|
"litellm/types/caching.py" = ["F401"]
|
|
"litellm/types/integrations/slack_alerting.py" = ["F401"]
|
|
"litellm/types/llms/custom_http.py" = ["F401"]
|
|
"litellm/types/llms/openai.py" = ["F401"]
|
|
"litellm/types/proxy/management_endpoints/scim_v2.py" = ["F401"]
|
|
"litellm/types/responses/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"]
|