argdigest.describe_contract#
- argdigest.describe_contract(contract, domains)[source]#
Render a contract as plain data, for documentation and introspection.
This is why a contract is declarative rather than an opaque callable: the accepted domain of a function with
**kwargsis invisible toinspect.signature, and this is what makes it readable again.- Parameters:
contract (FunctionContract)
domains (dict[str, Domain])
- Return type:
dict[str, Any]