| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Mechanically rewrite `assert cond[, msg]` in library code as `if not cond: raise AssertionError[(msg)]` so the checks still fire under `python -O`, which strips asserts. Test files are left alone since pytest relies on `assert` for introspection. Closes bitsandbytes-foundation#1408. Assisted-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Summary
Mechanical sweep of assert statements in library code, rewriting them as if not cond: raise AssertionError[(msg)] so the checks still fire under python -O (which strips assert). Picks up the task described in #1408.
Audits run before the rewrite
Test plan
Closes #1408.
Assisted by Claude Code.