-
Notifications
You must be signed in to change notification settings - Fork 186
Open
Description
In many files, assert __ is not None
statements are repeatedly used outside of unit tests (e.g., in asset_pricing/covariance.py
, iv/absorbing.py
, system/model.py
, etc.). Running Python in optimization mode (with -O or -OO) will fail to check these assert statements. Beyond this, they're simply less descriptive as generic AssertionErrors compared to, say, TypeErrors with a comprehensive error message (which can explain why we need these assert __is not None
checks in the first place). I propose we replace all non-test assert
statements with TypeErrors/ValueErrors is appropriate across the codebase; I've already begun drafting a PR. Let me know if, for whatever reason, this is an intentional design choice.
Metadata
Metadata
Assignees
Labels
No labels