Skip to content

Refactor wifi_handler to use dependency injection - #4161

Merged
svartkanin merged 1 commit into
archlinux:masterfrom
codefiles:wifi-handler-di
Jan 23, 2026
Merged

Refactor wifi_handler to use dependency injection#4161
svartkanin merged 1 commit into
archlinux:masterfrom
codefiles:wifi-handler-di

Conversation

@codefiles

Copy link
Copy Markdown
Contributor

Part of #4149

Comment thread archinstall/main.py
else:
wifi_handler = None

if not _check_online(wifi_handler):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a benefit in making this an optional parameter instead of creating the instance inside _check_online and avoiding the overhead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, testability.

@svartkanin
svartkanin enabled auto-merge (squash) January 23, 2026 03:39
@svartkanin
svartkanin merged commit 2ed6182 into archlinux:master Jan 23, 2026
9 checks passed
@codefiles
codefiles deleted the wifi-handler-di branch January 23, 2026 04:13
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