litellm/basedpyright-code-budget.json
mateo-berri 44e091aedb
chore(typing): clear basedpyright Any errors in proxy management endpoints
Convert pydantic table-model construction from Cls(**row.model_dump())
kwargs-unpacking to Cls.model_validate(...) across the management endpoint
hotspot files (team, key, internal user, scim, model management, spend
tracking, auth checks, proxy_server). Unpacking an untyped dict reports one
Any-typed argument per matched model field, so each converted site clears
10-35 diagnostics while running the exact same pydantic validation.
Conversions were limited to models verified to use pydantic's default
__init__; UserAPIKeyAuth and LiteLLM_VerificationTokenView keep their custom
kwargs-rewriting __init__ and are untouched. Two locally-verified helper
params move from Any to object.

Whole-tree basedpyright, measured against the branch point in the same
environment: reportAny 24,431 -> 22,741 (-1,690), reportArgumentType
2,189 -> 2,136 (-53), reportUnknownArgumentType 34,370 -> 34,067 (-303),
reportExplicitAny 7,285 -> 7,283 (-2); total 154,882 -> 152,834 (-2,048)
with no rule increasing anywhere and no per-file increases. No casts, no
suppressions, no behavior changes. Budgets ratcheted: basedpyright -2,048
across 4 rules, ruff ANN401 -2.
2026-07-29 09:16:18 +00:00

146 lines
2.5 KiB
JSON

{
"reportAny": {
"limit": 33216
},
"reportArgumentType": {
"limit": 2648
},
"reportAssignmentType": {
"limit": 330
},
"reportAttributeAccessIssue": {
"limit": 516
},
"reportCallIssue": {
"limit": 123
},
"reportConstantRedefinition": {
"limit": 59
},
"reportDeprecated": {
"limit": 326
},
"reportDuplicateImport": {
"limit": 42
},
"reportExplicitAny": {
"limit": 10228
},
"reportFunctionMemberAccess": {
"limit": 11
},
"reportGeneralTypeIssues": {
"limit": 227
},
"reportIncompatibleMethodOverride": {
"limit": 78
},
"reportIncompatibleVariableOverride": {
"limit": 12
},
"reportInconsistentOverload": {
"limit": 18
},
"reportIndexIssue": {
"limit": 37
},
"reportInvalidTypeForm": {
"limit": 35
},
"reportInvalidTypeVarUse": {
"limit": 5
},
"reportMatchNotExhaustive": {
"limit": 0
},
"reportMissingParameterType": {
"limit": 5893
},
"reportMissingTypeArgument": {
"limit": 15886
},
"reportMissingTypeStubs": {
"limit": 41
},
"reportOperatorIssue": {
"limit": 0
},
"reportOptionalCall": {
"limit": 0
},
"reportOptionalIterable": {
"limit": 0
},
"reportOptionalMemberAccess": {
"limit": 1085
},
"reportOptionalOperand": {
"limit": 0
},
"reportOptionalSubscript": {
"limit": 0
},
"reportPossiblyUnboundVariable": {
"limit": 77
},
"reportPrivateUsage": {
"limit": 2438
},
"reportRedeclaration": {
"limit": 12
},
"reportReturnType": {
"limit": 225
},
"reportTypedDictNotRequiredAccess": {
"limit": 27
},
"reportUndefinedVariable": {
"limit": 0
},
"reportUnknownArgumentType": {
"limit": 45567
},
"reportUnknownLambdaType": {
"limit": 113
},
"reportUnknownMemberType": {
"limit": 40525
},
"reportUnknownParameterType": {
"limit": 20384
},
"reportUnknownVariableType": {
"limit": 32099
},
"reportUnnecessaryCast": {
"limit": 177
},
"reportUnnecessaryComparison": {
"limit": 1023
},
"reportUnnecessaryContains": {
"limit": 7
},
"reportUnnecessaryIsInstance": {
"limit": 1206
},
"reportUntypedBaseClass": {
"limit": 165
},
"reportUntypedFunctionDecorator": {
"limit": 33
},
"reportUnusedClass": {
"limit": 33
},
"reportUnusedFunction": {
"limit": 206
},
"reportUnusedImport": {
"limit": 1005
},
"reportUnusedVariable": {
"limit": 1297
}
}