Skip to content

Commit

Permalink
Merge pull request #116 from aliev/chore/removed-literal
Browse files Browse the repository at this point in the history
chore: removed unnecessary Literal from errors
  • Loading branch information
aliev authored Jan 23, 2025
2 parents 8ad3001 + 1d5e6b7 commit 6a8ff3e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions aioauth/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from http import HTTPStatus
from typing import Generic, Optional
from urllib.parse import urljoin
from typing_extensions import Literal

from .requests import Request

from .collections import HTTPHeaderDict
Expand Down Expand Up @@ -72,7 +70,7 @@ class InvalidRequestError(Generic[UserType], OAuth2Error[UserType]):
otherwise malformed.
"""

error: Literal["invalid_request"] = "invalid_request"
error: ErrorType = "invalid_request"


class InvalidClientError(Generic[UserType], OAuth2Error[UserType]):
Expand Down Expand Up @@ -152,7 +150,7 @@ class MismatchingStateError(Generic[UserType], OAuth2Error[UserType]):
"""Unable to securely verify the integrity of the request and response."""

description = "CSRF Warning! State not equal in request and response."
error: Literal["mismatching_state"] = "mismatching_state"
error: ErrorType = "mismatching_state"


class UnauthorizedClientError(Generic[UserType], OAuth2Error[UserType]):
Expand Down

0 comments on commit 6a8ff3e

Please sign in to comment.