Skip to content

Commit

Permalink
Improve type of Token.for_user to allow subclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
sterliakov authored and 50-Course committed Feb 2, 2024
1 parent fc03667 commit c791e98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework_simplejwt/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def check_exp(
raise TokenError(format_lazy(_("Token '{}' claim has expired"), claim))

@classmethod
def for_user(cls, user: AuthUser) -> "Token":
def for_user(cls: Type[T], user: AuthUser) -> T:
"""
Returns an authorization token for the given user that will be provided
after authenticating the user's credentials.
Expand Down

0 comments on commit c791e98

Please sign in to comment.