diff --git a/archinstall/lib/menu/menu_helper.py b/archinstall/lib/menu/menu_helper.py index 849a9313e9..6ca3b9531f 100644 --- a/archinstall/lib/menu/menu_helper.py +++ b/archinstall/lib/menu/menu_helper.py @@ -1,13 +1,11 @@ -from typing import Any - from archinstall.lib.output import FormattedOutput from archinstall.tui.menu_item import MenuItem, MenuItemGroup -class MenuHelper: +class MenuHelper[ValueT]: def __init__( self, - data: list[Any], + data: list[ValueT], additional_options: list[str] = [], ) -> None: self._separator = '' @@ -30,12 +28,8 @@ def create_menu_group(self) -> MenuItemGroup: return group - def _get_table_header(self, data_formatted: dict[str, Any]) -> list[str]: - table_header = [key for key, val in data_formatted.items() if val is None] - return table_header - - def _table_to_data_mapping(self, data: list[Any]) -> dict[str, Any | None]: - display_data: dict[str, Any | None] = {} + def _table_to_data_mapping(self, data: list[ValueT]) -> dict[str, ValueT | str | None]: + display_data: dict[str, ValueT | str | None] = {} if data: table = FormattedOutput.as_table(data)