chore: add D212 lint rule to enforce Google-style docstrings (#1892)
This commit is contained in:
parent
df039bf97c
commit
d41d0c0128
3 changed files with 452 additions and 925 deletions
|
|
@ -1,3 +1 @@
|
|||
"""
|
||||
Request handlers for MCP authorization endpoints.
|
||||
"""
|
||||
"""Request handlers for MCP authorization endpoints."""
|
||||
|
|
|
|||
|
|
@ -15,9 +15,7 @@ from mcp.server.auth.provider import AccessToken, OAuthAuthorizationServerProvid
|
|||
|
||||
|
||||
class RevocationRequest(BaseModel):
|
||||
"""
|
||||
# See https://datatracker.ietf.org/doc/html/rfc7009#section-2.1
|
||||
"""
|
||||
"""# See https://datatracker.ietf.org/doc/html/rfc7009#section-2.1"""
|
||||
|
||||
token: str
|
||||
token_type_hint: Literal["access_token", "refresh_token"] | None = None
|
||||
|
|
@ -36,9 +34,7 @@ class RevocationHandler:
|
|||
client_authenticator: ClientAuthenticator
|
||||
|
||||
async def handle(self, request: Request) -> Response:
|
||||
"""
|
||||
Handler for the OAuth 2.0 Token Revocation endpoint.
|
||||
"""
|
||||
"""Handler for the OAuth 2.0 Token Revocation endpoint."""
|
||||
try:
|
||||
client = await self.client_authenticator.authenticate_request(request)
|
||||
except AuthenticationError as e: # pragma: no cover
|
||||
|
|
|
|||
|
|
@ -55,9 +55,7 @@ class TokenRequest(
|
|||
|
||||
|
||||
class TokenErrorResponse(BaseModel):
|
||||
"""
|
||||
See https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
|
||||
"""
|
||||
"""See https://datatracker.ietf.org/doc/html/rfc6749#section-5.2"""
|
||||
|
||||
error: TokenErrorCode
|
||||
error_description: str | None = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue