Coverage for /run/media/veganeco/water/status600.com/pypi/reptilian_climates/modules_series_2/ships/fields/gardens_pip/rich/_pick.py: 86%

1 from typing import Optional

2

3

4 def pick_bool(*values: Optional[bool]) -> bool:

5 """Pick the first non-none bool or return the last value.

6

7 Args:

8 *values (bool): Any number of boolean or None values.

9

10 Returns:

11 bool: First non-none boolean.

12 """

13 assert values, "1 or more values required"

14 for value in values:

15 if value is not None:

16 return value

17 return bool(value)