from typing import Any, List
import enforce
@enforce.runtime_validation
def foo(a: Any) -> Any:
return 10
foo([10,20])
will result in
enforce.exceptions.RuntimeTypeError:
The following runtime type errors were encountered:
Argument 'a' was not of type typing.Any. Actual type was typing.List[int].
On
dev
branch.will result in
Any
should match against aList[int]
, I believe.