Spaces:
Sleeping
Sleeping
Download venv/lib/python3.14/site-packages/rich/_pick.py from HSR-DeepThink/Perhance: direct link, hf CLI and curl.
- Browser
- Download file 423 Bytes
-
https://huggingface.co/spaces/HSR-DeepThink/Perhance/resolve/main/venv/lib/python3.14/site-packages/rich/_pick.py
- Command line
-
hf download hf://spaces/HSR-DeepThink/Perhance/venv/lib/python3.14/site-packages/rich/_pick.py
-
curl -L -o _pick.py https://huggingface.co/spaces/HSR-DeepThink/Perhance/resolve/main/venv/lib/python3.14/site-packages/rich/_pick.py
423 Bytes
| from typing import Optional | |
| def pick_bool(*values: Optional[bool]) -> bool: | |
| """Pick the first non-none bool or return the last value. | |
| Args: | |
| *values (bool): Any number of boolean or None values. | |
| Returns: | |
| bool: First non-none boolean. | |
| """ | |
| assert values, "1 or more values required" | |
| for value in values: | |
| if value is not None: | |
| return value | |
| return bool(value) | |