diff --git a/src/pick/__init__.py b/src/pick/__init__.py index 0e993f6..128d8da 100644 --- a/src/pick/__init__.py +++ b/src/pick/__init__.py @@ -55,7 +55,15 @@ def __post_init__(self) -> None: "min_selection_count is bigger than the available options, you will not be able to make any selection" ) + if all(isinstance(option, Option) and option.enabled == False for option in self.options): + raise NotImplementedError( + "all given options are disabled, you must at least have one enabled option." + ) + self.index = self.default_index + option = self.options[self.index] + if isinstance(option, Option) and not option.enabled: + self.move_down() def move_up(self) -> None: while True: