Skip to content

Commit

Permalink
🔥 pylint updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jiisanda committed Dec 14, 2024
1 parent cfa22b9 commit 21b98b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
pip install -r requirements.txt
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py') --disable=E0401,C0116,C0114,C0115,C0301,R0913,R0917,R0903,C0103,E1101
pylint $(git ls-files '*.py') --disable=E0401,C0116,C0114,C0115,C0301,R0913,R0914,R0917,R0903,C0103,E1101,W0611
11 changes: 5 additions & 6 deletions app/api/routes/documents/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,12 @@ async def patch_status(

if updated_status.mark_all:
return await repository.mark_all_read(user=user)
elif notification_id:
if notification_id:
return await repository.update_status(n_id=notification_id, updated_status=updated_status, user=user)
else:
raise http_404(
msg="Bad Request: Make sure to either flag mark_all "
"or enter notification_id along with correct status as payload."
)
raise http_404(
msg="Bad Request: Make sure to either flag mark_all "
"or enter notification_id along with correct status as payload."
)


@router.delete(
Expand Down
7 changes: 3 additions & 4 deletions app/db/repositories/documents/documents_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,9 @@ async def restore(self, file: str, owner: TokenData) -> DocumentMetadataRead:
raise http_409(
msg="Doc is not deleted"
)
else:
raise http_404(
msg="Doc does not exists"
)
raise http_404(
msg="Doc does not exists"
)

async def perm_delete_a_doc(self, document: UUID | None, owner: TokenData) -> None:

Expand Down

0 comments on commit 21b98b1

Please sign in to comment.