AndreaCensi / contracts

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.
http://andreacensi.github.io/contracts/
Other
398 stars 62 forks source link

http://andreacensi.github.io/contracts/api_lowlevel.html typo #64

Open ishanSrt opened 6 years ago

ishanSrt commented 6 years ago
new_contract('valid_name', lambda s: isinstance(s, str) and len(s)>0)
@contract(names='dict(int: (valid_name, int))')
def process_accounting(records):
    ...

should be

new_contract('valid_name', lambda s: isinstance(s, str) and len(s)>0)
@contract(records='dict(int: (valid_name, int))')
def process_accounting(records):
    ...