From 0c43122a6d468814734e67ac03470882ac905100 Mon Sep 17 00:00:00 2001 From: Leandro de Souza Date: Tue, 19 Dec 2023 11:44:20 -0300 Subject: [PATCH] lint: mypy errors --- src/api/v1/auth/views.py | 6 +++++- src/app/drf/authentication.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/api/v1/auth/views.py b/src/api/v1/auth/views.py index 6890258..6339427 100644 --- a/src/api/v1/auth/views.py +++ b/src/api/v1/auth/views.py @@ -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) diff --git a/src/app/drf/authentication.py b/src/app/drf/authentication.py index 583ca92..9947087 100644 --- a/src/app/drf/authentication.py +++ b/src/app/drf/authentication.py @@ -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)