Provides a drop-in replacement for Python's assert statement that remains active even when Python is run with -O (optimized mode). Currently at version 0.5.0, supports Python 3.9-3.12, and is released irregularly.
pip install safe-assertVerified import paths — ran on the pinned version, not inferred.
Run this script normally or with python -O; safe_assert will still raise an error.
Use function call syntax: safe_assert(condition, message)
If you rely on the return type being NoReturn, update your type hints to None.
Upgrade to Python 3.9+ or pin safe-assert to <0.5.0.
Use 'from safe_assert import safe_assert' instead of 'import safe_assert'.
Use 'from safe_assert import safe_assert' and then call 'safe_assert(condition, message)'.
No dependency data recorded yet.