Any should match against Lists
brool opened this issue · comments
On dev
branch.
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].
Any
should match against a List[int]
, I believe.
I think it was a regression, introduced in the last few patches, It is now fixed.
I hope there won't be any more regression any time soon =(
Thanks for the reporting!