refactor: Pass all constructor arguments by position

- The constructor arguments do not have default values; they are all
  required.  Revised deploy_chatmail() to pass them by position rather
  than name, so that the caller is not coupled to the names of the
  arguments inside the method definition.
This commit is contained in:
cliffmccarthy
2025-11-11 14:54:44 -06:00
parent e98b142585
commit 354418c877

View File

@@ -1104,28 +1104,28 @@ def deploy_chatmail(config_path: Path, disable_mail: bool) -> None:
tls_domains = [mail_domain, f"mta-sts.{mail_domain}", f"www.{mail_domain}"] tls_domains = [mail_domain, f"mta-sts.{mail_domain}", f"www.{mail_domain}"]
all_deployers = [ all_deployers = [
ChatmailDeployer(mail_domain=mail_domain), ChatmailDeployer(mail_domain),
JournaldDeployer(), JournaldDeployer(),
UnboundDeployer(), UnboundDeployer(),
TurnDeployer(mail_domain=mail_domain), TurnDeployer(mail_domain),
IrohDeployer(enable_iroh_relay=config.enable_iroh_relay), IrohDeployer(config.enable_iroh_relay),
AcmetoolDeployer(email=config.acme_email, domains=tls_domains), AcmetoolDeployer(config.acme_email, tls_domains),
WebsiteDeployer(config=config), WebsiteDeployer(config),
ChatmailVenvDeployer(config=config), ChatmailVenvDeployer(config),
MtastsDeployer(), MtastsDeployer(),
OpendkimDeployer(mail_domain=mail_domain), OpendkimDeployer(mail_domain),
# Dovecot should be started before Postfix # Dovecot should be started before Postfix
# because it creates authentication socket # because it creates authentication socket
# required by Postfix. # required by Postfix.
DovecotDeployer(config=config, disable_mail=disable_mail), DovecotDeployer(config, disable_mail),
PostfixDeployer(config=config, disable_mail=disable_mail), PostfixDeployer(config, disable_mail),
FcgiwrapDeployer(), FcgiwrapDeployer(),
NginxDeployer(config=config), NginxDeployer(config),
RspamdDeployer(), RspamdDeployer(),
EchobotDeployer(mail_domain=mail_domain), EchobotDeployer(mail_domain),
MtailDeployer(mtail_address=config.mtail_address), MtailDeployer(config.mtail_address),
GithashDeployer(), GithashDeployer(),
] ]