Spaces:
Running
Running
Download code-review-env/sample_project/validators.py from Athmabhiram1/nodeaudit-openenv: direct link, hf CLI and curl.
- Browser
- Download file 260 Bytes
-
https://huggingface.co/spaces/Athmabhiram1/nodeaudit-openenv/resolve/main/code-review-env/sample_project/validators.py
- Command line
-
hf download hf://spaces/Athmabhiram1/nodeaudit-openenv/code-review-env/sample_project/validators.py
-
curl -L -o validators.py https://huggingface.co/spaces/Athmabhiram1/nodeaudit-openenv/resolve/main/code-review-env/sample_project/validators.py
260 Bytes
| def is_non_empty(value: str | None) -> bool: | |
| return value is not None and value.strip() != "" | |
| def validate_coupon(code: str | None) -> bool: | |
| # Intentional bug: accepts invalid short code when value is None | |
| return (code or "").startswith("SAVE") | |