diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 977aaa7..e6bc066 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -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 diff --git a/app/api/routes/documents/notify.py b/app/api/routes/documents/notify.py index a4d9b75..03a1ac9 100644 --- a/app/api/routes/documents/notify.py +++ b/app/api/routes/documents/notify.py @@ -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( diff --git a/app/db/repositories/documents/documents_metadata.py b/app/db/repositories/documents/documents_metadata.py index e9770a6..c660218 100644 --- a/app/db/repositories/documents/documents_metadata.py +++ b/app/db/repositories/documents/documents_metadata.py @@ -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: