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
The proposed use of Annotated types is not equivalent to the old custom NewType with regards to static type checking. (NewType introduces a new type, while Annotated adds annotations to an existing type.)
Python is updating the Typing spec which causes
Variable not allowed in type expression
for types created with marshmallow_dataclass'sNewType
microsoft/pyright#7268
The modern way is to use
typing.Annotated
. (Python >=3.9)I propose deprecating
NewType
and addingAnnotated
support.Example:
The text was updated successfully, but these errors were encountered: