mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-17 23:51:30 +00:00
style(mcp/v2): keep the one-line authorization_code within black-88
The web edit that put authorization_code back on one line landed at 90 chars, which fails the repo's black --check (CI lint-black). Trim the trailing comment so the line stays single (matching its sibling enum members) and fits 88, rather than letting black re-split it into the three-line form. Also drops the stale "sixth mode" wording in the module docstring now that AuthSpecKind has seven members.
This commit is contained in:
parent
0a696c50dd
commit
1163711bb4
1 changed files with 2 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ Design invariants encoded here:
|
|||
`AuthSpecKind`, one arm per mode. No field-presence inference, no precedence cascade.
|
||||
- **Exhaustive dispatch, no wildcard.** `auth_spec_kind` is a closed enum, so the `match` in
|
||||
`resolve()` has no `_` arm — basedpyright (`reportMatchNotExhaustive`) guarantees every mode
|
||||
is handled. Adding a sixth mode without an arm fails the type gate, not at runtime.
|
||||
is handled. Adding a new mode without an arm fails the type gate, not at runtime.
|
||||
- **Fail-closed at the boundary.** An unknown mode string can only enter through
|
||||
`parse_auth_spec_kind()`, which returns a typed `CredError`. Inside the core the mode is
|
||||
always valid, so illegal states are unrepresentable.
|
||||
|
|
@ -45,7 +45,7 @@ class AuthSpecKind(str, Enum):
|
|||
scheme is a parameter the arm carries, not its own mode.
|
||||
"""
|
||||
|
||||
authorization_code = "authorization_code" # per-user 3LO; gateway is the OAuth client
|
||||
authorization_code = "authorization_code" # per-user 3LO; gateway is OAuth client
|
||||
client_credentials = "client_credentials" # gateway service account (M2M)
|
||||
token_exchange = "token_exchange" # RFC 8693 on-behalf-of
|
||||
api_key = "api_key" # static header, any scheme (BYOK = per-user-seeded source)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue