Fix linting

This commit is contained in:
Dennis Melzer 2024-08-25 22:03:23 +02:00
parent c243955a5c
commit 9de0ed6103

View File

@ -656,9 +656,14 @@ class MailAccountHandler(LoggingMixin):
return processed_elements return processed_elements
def filename_exclusion_matches(filter_attachment_filename_exclude, filename) -> bool: def filename_exclusion_matches(
filter_attachment_filename_exclude,
filename,
) -> bool:
if filter_attachment_filename_exclude: if filter_attachment_filename_exclude:
filter_attachment_filename_exclusions = filter_attachment_filename_exclude.split(",") filter_attachment_filename_exclusions = (
filter_attachment_filename_exclude.split(",")
)
# Force the filename and pattern to the lowercase # Force the filename and pattern to the lowercase
# as this is system dependent otherwise # as this is system dependent otherwise
@ -705,7 +710,8 @@ class MailAccountHandler(LoggingMixin):
) )
continue continue
elif self.filename_exclusion_matches( elif self.filename_exclusion_matches(
rule.filter_attachment_filename_exclude, att.filename rule.filter_attachment_filename_exclude,
att.filename,
): ):
self.log.debug( self.log.debug(
f"Rule {rule}: " f"Rule {rule}: "