Skip to content

Commit 0c46320

Browse files
committed
Refactor typing for grant_types in auth.py
1 parent 591e153 commit 0c46320

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mcp/shared/auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Literal, Union
1+
from typing import Any, Literal
22

33
from pydantic import AnyHttpUrl, AnyUrl, BaseModel, Field, field_validator
44

@@ -47,7 +47,7 @@ class OAuthClientMetadata(BaseModel):
4747
# ie: we do not support client_secret_basic
4848
token_endpoint_auth_method: Literal["none", "client_secret_post"] = "client_secret_post"
4949
# grant_types: this implementation only supports authorization_code & refresh_token
50-
grant_types: list[Union[Literal["authorization_code", "refresh_token"], str]] = [
50+
grant_types: list[Literal["authorization_code", "refresh_token"] | str] = [
5151
"authorization_code",
5252
"refresh_token",
5353
]

0 commit comments

Comments
 (0)