mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
LIT001 and LIT002 only see literal dict annotations and constructions, so a value whose dict type is inferred (a helper returning dict[str, int], a defaultdict threaded through calls) sails through review. scripts/check_dict_usage.py walks mypy's typed AST and flags every expression whose proper type is a bare mutable dict variant, and scripts/dict_usage_gate.py wraps it in the same grandfathered budget model as the LIT and basedpyright gates: fail only when the total is over the dict-usage-budget.json limit and above the merge-base count, with --update ratcheting limits down and branch-seeded rules passed through untouched The gate measures from the gate-owned .venv-typecheck env (mypy inference depends on which packages are importable), caches base counts in the shared lint cache under a dict-usage-base- prefix keyed by the checker's own bytes, and runs as its own CI job because a full mypy pass would blow the lint job's 15-minute timeout. ensure_typecheck_env now holds an flock during provisioning so this gate and the basedpyright gate can share the env under make lint -j. Budget seeded at the current count of 54056 |
||
|---|---|---|
| .. | ||
| adaptive_router_demo | ||
| health_check | ||
| benchmark_anthropic_messages_perf.py | ||
| benchmark_chat_completions_perf.py | ||
| benchmark_mock.py | ||
| benchmark_model_response_creator.py | ||
| benchmark_proxy_vs_provider.py | ||
| benchmark_streaming_chunk_overhead.py | ||
| budget_ratchet_check.py | ||
| check_dict_usage.py | ||
| check_type_discipline.py | ||
| create_litellm_branch.ps1 | ||
| create_litellm_branch.sh | ||
| create_team_key_and_submit_guardrail.sh | ||
| dict_usage_gate.py | ||
| eval_compression.py | ||
| install-cli.sh | ||
| install.sh | ||
| install_git_hooks.sh | ||
| mock_bedrock_passthrough_target.py | ||
| mock_grayswan_timeout_server.py | ||
| mutation_report.py | ||
| pre_commit_lint.sh | ||
| prisma_generate_if_needed.py | ||
| ruff_strict_gate.py | ||
| test_agent_mcp_endpoints.sh | ||
| test_guardrails_register_endpoints.sh | ||
| test_tool_allowlist_script.py | ||
| tpm_headline_test.sh | ||
| type_check_gate.py | ||
| type_discipline_gate.py | ||
| verify_adaptive_router.py | ||
| with_dashboard_node.sh | ||