make cmdeploy fmt happy

This commit is contained in:
missytake
2025-04-18 20:05:36 +02:00
parent 0125dda6d7
commit 0c28310861
2 changed files with 3 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ class Config:
def _getbytefile(self):
return open(self._inipath, "rb")
def get_user(self, addr):
def get_user(self, addr) -> User:
if not addr or "@" not in addr or "/" in addr:
raise ValueError(f"invalid address {addr!r}")
@@ -116,8 +116,7 @@ def get_default_config_content(mail_domain, **overrides):
lines = []
for line in content.split("\n"):
for key, value in privacy.items():
value = value.format(mail_domain=mail_domain)
value_lines = value.strip().split("\n")
value_lines = value.format(mail_domain=mail_domain).strip().split("\n")
if not line.startswith(f"{key} =") or not value_lines:
continue
if len(value_lines) == 1:

View File

@@ -262,7 +262,7 @@ class OutgoingBeforeQueueHandler:
return
passthrough_recipients = self.config.passthrough_recipients
for recipient in envelope.rcpt_tos:
if recipient_matches_passthrough(recipient, passthrough_recipients):
continue