Skip to content

Refactor arch_config_handler to use DI - #4280

Merged
svartkanin merged 1 commit into
archlinux:masterfrom
codefiles:arch-config-handler-di
Mar 3, 2026
Merged

Refactor arch_config_handler to use DI#4280
svartkanin merged 1 commit into
archlinux:masterfrom
codefiles:arch-config-handler-di

Conversation

@codefiles

Copy link
Copy Markdown
Contributor

Part of #4149

@codefiles
codefiles requested a review from Torxed as a code owner March 3, 2026 02:20
@svartkanin

Copy link
Copy Markdown
Collaborator

@codefiles thanks for all the updates,
Would it make sense to transform the scripts into classes with an abstract something like

class Script(ABC):
     def main(self):
        pass
        
class Guided(Script):
     def __init__(arch_config_handler: ArchConfigHandler | None = None) -> None:
          ...
     
     @override
     def main(self) -> None:
         ....

any thoughts?

@svartkanin
svartkanin merged commit 813b9b3 into archlinux:master Mar 3, 2026
9 checks passed
@codefiles
codefiles deleted the arch-config-handler-di branch March 3, 2026 13:33
@codefiles

Copy link
Copy Markdown
Contributor Author

I'm not sure but I would recommend waiting till device_handler is also switched to dependency injection before making a change like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants