mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Configures ruff as the one stop linter and resolves warnings it raised
This commit is contained in:
@@ -47,7 +47,7 @@ class TestMailLiveServer(TestCase):
|
||||
|
||||
except MailError as e:
|
||||
self.fail(f"Failure: {e}")
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def test_process_non_gmail_server_tag(self):
|
||||
@@ -66,5 +66,5 @@ class TestMailLiveServer(TestCase):
|
||||
|
||||
except MailError as e:
|
||||
self.fail(f"Failure: {e}")
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
pass
|
||||
|
@@ -12,11 +12,8 @@ from unittest import mock
|
||||
from django.core.management import call_command
|
||||
from django.db import DatabaseError
|
||||
from django.test import TestCase
|
||||
from documents.data_models import ConsumableDocument
|
||||
from documents.data_models import DocumentMetadataOverrides
|
||||
from documents.models import Correspondent
|
||||
from documents.tests.utils import DirectoriesMixin
|
||||
from documents.tests.utils import DocumentConsumeDelayMixin
|
||||
from documents.tests.utils import FileSystemAssertsMixin
|
||||
from imap_tools import EmailAddress
|
||||
from imap_tools import FolderInfo
|
||||
@@ -183,7 +180,7 @@ class BogusMailBox(ContextManager):
|
||||
)
|
||||
self.messages = list(filter(lambda m: m.uid not in uid_list, self.messages))
|
||||
else:
|
||||
raise Exception()
|
||||
raise Exception
|
||||
|
||||
|
||||
def fake_magic_from_buffer(buffer, mime=False):
|
||||
@@ -769,7 +766,7 @@ class TestMail(
|
||||
with self.assertRaisesRegex(
|
||||
MailError,
|
||||
"Error while authenticating account",
|
||||
) as context:
|
||||
):
|
||||
self.mail_account_handler.handle_mail_account(account)
|
||||
|
||||
def test_error_skip_account(self):
|
||||
|
Reference in New Issue
Block a user