mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-06-23 22:04:19 +00:00
Typing, I think
This commit is contained in:
@@ -2118,7 +2118,6 @@ src/paperless_mail/mail.py:0: error: Function is missing a return type annotatio
|
||||
src/paperless_mail/mail.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_mail/mail.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_mail/mail.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_mail/mail.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_mail/mail.py:0: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
|
||||
src/paperless_mail/mail.py:0: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
|
||||
src/paperless_mail/mail.py:0: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
|
||||
|
||||
@@ -536,7 +536,7 @@ class MailAccountHandler(LoggingMixin):
|
||||
self.log.debug(f"Processing mail account {account}")
|
||||
|
||||
total_processed_files = 0
|
||||
consumed_messages: set[tuple[str, str]] = set()
|
||||
consumed_messages: set[tuple[str, str | None]] = set()
|
||||
try:
|
||||
with get_mailbox(
|
||||
account.imap_server,
|
||||
@@ -607,8 +607,8 @@ class MailAccountHandler(LoggingMixin):
|
||||
rule: MailRule,
|
||||
*,
|
||||
supports_gmail_labels: bool,
|
||||
consumed_messages: set[tuple[str, str]],
|
||||
):
|
||||
consumed_messages: set[tuple[str, str | None]],
|
||||
) -> int:
|
||||
folders = [rule.folder]
|
||||
# In case of MOVE, make sure also the destination exists
|
||||
if rule.action == MailRule.MailAction.MOVE:
|
||||
@@ -655,7 +655,7 @@ class MailAccountHandler(LoggingMixin):
|
||||
|
||||
mails_processed = 0
|
||||
total_processed_files = 0
|
||||
rule_seen_messages: set[tuple[str, str]] = set()
|
||||
rule_seen_messages: set[tuple[str, str | None]] = set()
|
||||
|
||||
for message in messages:
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -863,7 +863,7 @@ class TestMail(
|
||||
|
||||
self.assertEqual(len(self.mailMocker.bogus_mailbox.messages), 0)
|
||||
|
||||
def test_handle_mail_account_overlapping_rules_only_first_consumes(self):
|
||||
def test_handle_mail_account_overlapping_rules_only_first_consumes(self) -> None:
|
||||
account = MailAccount.objects.create(
|
||||
name="test",
|
||||
imap_server="",
|
||||
@@ -895,7 +895,7 @@ class TestMail(
|
||||
]
|
||||
self.assertEqual(queued_rule.id, first_rule.id)
|
||||
|
||||
def test_handle_mail_account_skip_duplicate_uids_from_fetch(self):
|
||||
def test_handle_mail_account_skip_duplicate_uids_from_fetch(self) -> None:
|
||||
account = MailAccount.objects.create(
|
||||
name="test",
|
||||
imap_server="",
|
||||
|
||||
Reference in New Issue
Block a user