mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
fix(proxy): Final-annotate parsed_permissions for LIT010 gate
type_discipline_gate flagged the new json.loads assignment in generate_key_helper_fn; mark it Final like the rest of the file.
This commit is contained in:
parent
0a86bdabdb
commit
c7f6718216
1 changed files with 1 additions and 1 deletions
|
|
@ -5283,7 +5283,7 @@ async def generate_key_helper_fn(
|
|||
if isinstance(saved_token["metadata"], str):
|
||||
saved_token["metadata"] = json.loads(saved_token["metadata"])
|
||||
if isinstance(saved_token["permissions"], str):
|
||||
parsed_permissions = json.loads(saved_token["permissions"])
|
||||
parsed_permissions: Final = json.loads(saved_token["permissions"])
|
||||
# Refuse only when the permission is requested (truthy). An explicit
|
||||
# false must not trip a substring check on the serialized JSON.
|
||||
_refuse_get_spend_routes_unless_premium(parsed_permissions, premium_user)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue