beartype enforces type hints. It can be used manually with @beartype
, or at the top of {your_package}.__init__
submodule put
Code will fail if you pass incorrect types to a function.
beartype integrates with jaxtyping for arrays, pandera for dataframes, and more. Some type hint challenges.