The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test(ci): annotate new test locals as Final
yunengbbfa853d844b
diff --git a/tests/test_litellm/test_budget_ratchet_check.py b/tests/test_litellm/test_budget_ratchet_check.pyindex d6809b22161..b359b8b42e5 100644--- a/tests/test_litellm/test_budget_ratchet_check.py+++ b/tests/test_litellm/test_budget_ratchet_check.py@@ -9,6 +9,7 @@ import importlib.utilimport subprocessimport sysfrom pathlib import Path+from typing import Final_MODULE_PATH = (Path(__file__).resolve().parents[2] / "scripts" / "budget_ratchet_check.py"@@ -93,31 +94,31 @@ def test_graduation_never_excuses_a_raised_limit():def test_dropped_rule_the_checker_retired_is_clean():- base = {"TQ008": _spec_of(10993)}+ base: Final = {"TQ008": _spec_of(10993)}assert ratchet.regressions_for("b.json", base, {}, retired=frozenset({"TQ008"})) == []def test_dropped_rule_the_checker_still_emits_is_a_regression():- base = {"TQ001": _spec_of(5), "TQ008": _spec_of(10993)}- regs = ratchet.regressions_for("b.json", base, {}, retired=frozenset({"TQ008"}))+ base: Final = {"TQ001": _spec_of(5), "TQ008": _spec_of(10993)}+ regs: Final = ratchet.regressions_for("b.json", base, {}, retired=frozenset({"TQ008"}))assert [r.rule for r in regs] == ["TQ001"]assert "dropped" in regs[0].detaildef test_retirement_never_excuses_a_raised_limit():- base = {"TQ008": _spec_of(0)}- regs = ratchet.regressions_for("b.json", base, {"TQ008": _spec_of(7)}, retired=frozenset({"TQ008"}))+ base: Final = {"TQ008": _spec_of(0)}+ regs: Final = ratchet.regressions_for("b.json", base, {"TQ008": _spec_of(7)}, retired=frozenset({"TQ008"}))assert [r.rule for r in regs] == ["TQ008"]assert "0 -> 7" in regs[0].detaildef test_retired_rules_come_from_the_paired_checker():- base = {"TQ001": _spec_of(5), "TQ008": _spec_of(10993)}+ base: Final = {"TQ001": _spec_of(5), "TQ008": _spec_of(10993)}assert ratchet.retired_rules("test-quality-budget.json", base) == frozenset({"TQ008"})def test_budgets_without_a_paired_checker_never_retire():- base = {"TQ008": _spec_of(1)}+ base: Final = {"TQ008": _spec_of(1)}for rel in ("ruff-strict-budget.json", "type-discipline-budget.json", "basedpyright-code-budget.json"):assert ratchet.retired_rules(rel, base) == frozenset()diff --git a/tests/test_litellm/test_check_test_quality.py b/tests/test_litellm/test_check_test_quality.pyindex 2a0e32d4de7..bf05775d09d 100644--- a/tests/test_litellm/test_check_test_quality.py+++ b/tests/test_litellm/test_check_test_quality.py@@ -642,7 +642,7 @@ _VIOLATING_SNIPPETS: Final = MappingProxyType(def test_rule_codes_match_every_code_the_checker_emits(tmp_path):- emitted = frozenset(+ emitted: Final = frozenset(v.codefor name, source in _VIOLATING_SNIPPETS.values()for v in checker.check_file(_written(tmp_path, source, name))