hashberg-io / typing-validation

A simple library for runtime type-checking.
https://typing-validation.readthedocs.io/
MIT License
7 stars 4 forks source link

Crash when non-hashable object is passed as type in validation. #12

Closed sg495 closed 9 months ago

sg495 commented 9 months ago

Attempting to run:

validate(1, {})

Results in an unexpected TypeError:

> if t in _basic_types:
E TypeError: unhashable type: 'dict'

To fix, must check that t is hashable at the top of validate.