enforce
enforce copied to clipboard
Python 3.5+ runtime type checking for integration testing and data validation
This will render the description correctly on the [PyPI page](https://pypi.org/project/enforce/), when you next do a release. Docs: https://setuptools.pypa.io/en/latest/references/keywords.html?highlight=long_description#keywords
Just started a new fork: https://github.com/SamuelMarks/enforce New features / changes (thus far): - Switch to black formatting - Upgrade all dependencies - Remove Travis and AppVeyor - Add new shields,...
New features / changes (thus far): - Switch to black formatting - Upgrade all dependencies - Remove Travis and AppVeyor - Add new shields, remove all ones - Integrate GitHub...
``` [...] File ".../lib/python3.7/site-packages/enforce/__init__.py", line 1, in from .decorators import runtime_validation File ".../lib/python3.7/site-packages/enforce/decorators.py", line 11, in from .enforcers import apply_enforcer, Parameters, GenericProxy File ".../lib/python3.7/site-packages/enforce/enforcers.py", line 10, in from .validator import...
This is a bit of a tricky one, but suppose you had something like the following: ```python @overload def test(a: int, b: float) -> str: ... @overload def test(a: List[int],...
Heya, cool library. I haven't given it a try yet personally, but I've been using `typing.Annotated` for runtime data validation in a similar way to what you've accomplished here. With...
``` import enforce │ 59 ss = SimStrategy() File "/home/shawn/.virtualenvs/TEC/lib/python3.8/site-packages/enforce/__init__.py", line 1, in │ 60 ss.setMaxTicks(max_days * constants.S_PER_DAY / ss.time_step + 1) from .decorators import runtime_validation │‼ 61 File "/home/shawn/.virtualenvs/TEC/lib/python3.8/site-packages/enforce/decorators.py",...
adds content type info to setup.py
Enforce 0.3.4. ```python import sys from typing import List import enforce @enforce.runtime_validation def noop_validated(i: List) -> List: return i def noop(i: List) -> List: return i if __name__ == '__main__':...
I know this is similar to #45 but bare with me, it is different I have this situation: ```python from enforce import runtime_validation class A: @runtime_validation def clone(self) -> 'A':...