( self, device_modifications: list[DeviceModification], lvm_config: LvmConfiguration | None = None, preset: DiskEncryption | None = None, )
| 25 | |
| 26 | class DiskEncryptionMenu(AbstractSubMenu[DiskEncryption]): |
| 27 | def __init__( |
| 28 | self, |
| 29 | device_modifications: list[DeviceModification], |
| 30 | lvm_config: LvmConfiguration | None = None, |
| 31 | preset: DiskEncryption | None = None, |
| 32 | ): |
| 33 | if preset: |
| 34 | self._enc_config = preset |
| 35 | else: |
| 36 | self._enc_config = DiskEncryption() |
| 37 | |
| 38 | self._device_modifications = device_modifications |
| 39 | self._lvm_config = lvm_config |
| 40 | |
| 41 | menu_options = self._define_menu_options() |
| 42 | self._item_group = MenuItemGroup(menu_options, sort_items=False, checkmarks=True) |
| 43 | |
| 44 | super().__init__( |
| 45 | self._item_group, |
| 46 | self._enc_config, |
| 47 | allow_reset=True, |
| 48 | ) |
| 49 | |
| 50 | def _define_menu_options(self) -> list[MenuItem]: |
| 51 | return [ |
nothing calls this directly
no test coverage detected