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:
er-s-an 2026-10-18 09:35:31 +08:00
parent 0a86bdabdb
commit c7f6718216

View file

@ -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)