Spaces:
Sleeping
Sleeping
Download code-review-env/sample_project/inventory.py from Athmabhiram1/nodeaudit-openenv: direct link, hf CLI and curl.
- Browser
- Download file 212 Bytes
-
https://huggingface.co/spaces/Athmabhiram1/nodeaudit-openenv/resolve/main/code-review-env/sample_project/inventory.py
- Command line
-
hf download hf://spaces/Athmabhiram1/nodeaudit-openenv/code-review-env/sample_project/inventory.py
-
curl -L -o inventory.py https://huggingface.co/spaces/Athmabhiram1/nodeaudit-openenv/resolve/main/code-review-env/sample_project/inventory.py
212 Bytes
| from validators import is_non_empty | |
| STOCK = {"widget": 4, "gizmo": 0} | |
| def is_available(item_name: str) -> bool: | |
| if not is_non_empty(item_name): | |
| return False | |
| return STOCK.get(item_name, 0) > 0 | |