MCPcopy Create free account
hub / github.com/archlinux/archinstall / set_enabled

Method set_enabled

archinstall/lib/menu/abstract_menu.py:85–98  ·  view source on GitHub ↗
(self, key: str, enabled: bool)

Source from the content-addressed store, hash-verified

83 setattr(self._config, item.key, item.value)
84
85 def set_enabled(self, key: str, enabled: bool) -> None:
86 # the __config__ is associated with multiple items
87 found = False
88
89 is_config_key = key == CONFIG_KEY
90
91 for item in self._menu_item_group.items:
92 if item.key:
93 if item.key == key or (is_config_key and SpecialMenuKey.matches(item.key)):
94 item.enabled = enabled
95 found = True
96
97 if not found:
98 raise ValueError(f'No selector found: {key}')
99
100 def disable_all(self) -> None:
101 for item in self._menu_item_group.items:

Callers 2

show_menuFunction · 0.80
show_menuFunction · 0.80

Calls 1

matchesMethod · 0.80

Tested by

no test coverage detected