You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when string types (such as NameType, PathType, ContentType, ...) have their constraints violated, the exception mentions the name of the type that was violated.
This can be confusing, since the __init__-functions of the classes using these types in their attributes, only call for str in their type.
We should improve the error message in the exception to make it less confusing.
The text was updated successfully, but these errors were encountered:
Ah, maybe you're referring to the docs, where the str type aliases are indeed shown as just str. Maybe we can use typing.NewType instead of the current way of just aliasing the str type.
Currently, when string types (such as
NameType
,PathType
,ContentType
, ...) have their constraints violated, the exception mentions the name of the type that was violated.This can be confusing, since the
__init__
-functions of the classes using these types in their attributes, only call forstr
in their type.We should improve the error message in the exception to make it less confusing.
The text was updated successfully, but these errors were encountered: