style: apply ruff formatting to source and test files
This commit is contained in:
@@ -27,9 +27,7 @@ class CreatePostUseCase:
|
||||
|
||||
# Check if slug already exists
|
||||
if await self._post_repo.slug_exists(slug.value):
|
||||
raise AlreadyExistsException(
|
||||
f"Post with slug '{slug.value}' already exists"
|
||||
)
|
||||
raise AlreadyExistsException(f"Post with slug '{slug.value}' already exists")
|
||||
|
||||
# Create domain entity
|
||||
post = Post.create(
|
||||
|
||||
@@ -38,9 +38,7 @@ class ListPostsUseCase:
|
||||
offset: int | None = None,
|
||||
) -> list[PostResponseDTO]:
|
||||
"""Get posts by author."""
|
||||
posts = await self._post_repo.get_by_author(
|
||||
author_id, limit=limit, offset=offset
|
||||
)
|
||||
posts = await self._post_repo.get_by_author(author_id, limit=limit, offset=offset)
|
||||
return [self._map_to_dto(post) for post in posts]
|
||||
|
||||
async def by_tag(
|
||||
|
||||
Reference in New Issue
Block a user