PyContracts is a Python package that allows to declare constraints on function parameters and return values. Contracts can be specified using Python3 annotations, or inside a docstring. PyContracts supports a basic type system, variables binding, arithmetic constraints, and has several specialized contracts and an extension API.
I noticed while vertically integrating some of your code locally in a project that I would get strange errors about changing contracts that had been previously defined. After much frustration I checked the imports and found that they were loading from my site-packages directory rather than the local src/ packages. This caused contracts to be defined by a mix of different versions from the local src/ directory and my site-packages. I have created this patch to remediate this issue.
I noticed while vertically integrating some of your code locally in a project that I would get strange errors about changing contracts that had been previously defined. After much frustration I checked the imports and found that they were loading from my site-packages directory rather than the local src/ packages. This caused contracts to be defined by a mix of different versions from the local src/ directory and my site-packages. I have created this patch to remediate this issue.
-Ross