Skip to content

Commit

Permalink
lint: mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrodesouzadev committed Dec 19, 2023
1 parent 8d0b138 commit 0c43122
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/api/v1/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ def jwt_token(self, request: Request):
user = auth.authenticate(**data)

refresh = jwt_schemas.TokenObtainPairSerializer().get_token(user)
token = TokenDTO(type="Bearer", access=str(refresh.access_token), refresh=str(refresh))
token = TokenDTO(
type="Bearer",
access=str(refresh.access_token), # type: ignore
refresh=str(refresh),
)
user.token = token # type: ignore
srlzr = schemas.JwtTokenAuthenticationOutputSchema(instance=user)
return Response(data=srlzr.data, status=200)
Expand Down
2 changes: 1 addition & 1 deletion src/app/drf/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ def authenticate(self, request):

class LastLoginAwareJwtAuthentication(DrfJwtAuthentication):
def authenticate(self, request):
auth_result: tuple[User, str] | None = super().authenticate(request)
auth_result: tuple[User, str] | None = super().authenticate(request) # type: ignore
return after_authenticate(auth_result)

0 comments on commit 0c43122

Please sign in to comment.