Make DtypeError inherit from ValueError as well so that pydantic correctly wraps it in ValidationError

This commit is contained in:
sneakers-the-rat 2024-06-27 22:19:59 -07:00
parent 2f5a4be8e7
commit 3544ce2bdc
Signed by untrusted user who does not match committer: jonny
GPG key ID: 6DCB96EF1E4D232D

View file

@ -7,7 +7,7 @@ class InterfaceError(Exception):
"""Parent mixin class for errors raised by :class:`.Interface` subclasses"""
class DtypeError(TypeError, InterfaceError):
class DtypeError(ValueError, TypeError, InterfaceError):
"""Exception raised for invalid dtypes"""