Refactor application_handler to use DI (#4172)

This commit is contained in:
codefiles 2026-01-27 00:39:42 -05:00 committed by GitHub
parent ef3b6ab853
commit d7bcd431a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -44,6 +44,3 @@ class ApplicationHandler:
install_session, install_session,
app_config.firewall_config, app_config.firewall_config,
) )
application_handler = ApplicationHandler()

View File

@ -2,7 +2,7 @@ import os
import time import time
from pathlib import Path from pathlib import Path
from archinstall.lib.applications.application_handler import application_handler from archinstall.lib.applications.application_handler import ApplicationHandler
from archinstall.lib.args import arch_config_handler from archinstall.lib.args import arch_config_handler
from archinstall.lib.authentication.authentication_handler import AuthenticationHandler from archinstall.lib.authentication.authentication_handler import AuthenticationHandler
from archinstall.lib.configuration import ConfigurationOutput from archinstall.lib.configuration import ConfigurationOutput
@ -55,6 +55,7 @@ def perform_installation(
mountpoint: Path, mountpoint: Path,
mirror_list_handler: MirrorListHandler, mirror_list_handler: MirrorListHandler,
auth_handler: AuthenticationHandler, auth_handler: AuthenticationHandler,
application_handler: ApplicationHandler,
) -> None: ) -> None:
""" """
Performs the installation steps on a block device. Performs the installation steps on a block device.
@ -224,6 +225,7 @@ def guided() -> None:
arch_config_handler.args.mountpoint, arch_config_handler.args.mountpoint,
mirror_list_handler, mirror_list_handler,
AuthenticationHandler(), AuthenticationHandler(),
ApplicationHandler(),
) )