You've already forked RekomenciBackend
add lints
This commit is contained in:
@@ -10,8 +10,5 @@ class UserDataGateway(Protocol):
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def exists_by_email(
|
||||
self,
|
||||
email: str
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
async def exists_by_email(self, email: str) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
@@ -8,6 +8,7 @@ from template_project.application.common.entity import Entity, to_entity
|
||||
|
||||
UserId = NewType("UserId", UUID)
|
||||
|
||||
|
||||
@to_entity
|
||||
class User(Entity[UserId]):
|
||||
email: str
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import override
|
||||
|
||||
from template_project.application.common.errors import ApplicationError, to_error
|
||||
|
||||
|
||||
@@ -10,6 +11,7 @@ class UserWithEmailAlreadyExistsError(ApplicationError):
|
||||
def __str__(self) -> str:
|
||||
return f"User with the email={self.email!r} already exists"
|
||||
|
||||
|
||||
@to_error
|
||||
class UserUnauthorizedError(ApplicationError):
|
||||
pass
|
||||
|
||||
@@ -11,6 +11,7 @@ class GetMeResponse:
|
||||
id: UserId
|
||||
email: str
|
||||
|
||||
|
||||
response_converter = get_converter(User, GetMeResponse)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user