Skip to content

Commit c791e98

Browse files
sterliakov50-Course
authored andcommitted
Improve type of Token.for_user to allow subclasses
1 parent fc03667 commit c791e98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework_simplejwt/tokens.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def check_exp(
197197
raise TokenError(format_lazy(_("Token '{}' claim has expired"), claim))
198198

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

0 commit comments

Comments
 (0)