diff --git a/src/cattrs/_compat.py b/src/cattrs/_compat.py index 72c371a7..6a21bd49 100644 --- a/src/cattrs/_compat.py +++ b/src/cattrs/_compat.py @@ -135,7 +135,7 @@ def is_union_type(obj): ) def get_newtype_base(typ: Any) -> Optional[type]: - supertype = getattr(type, "__supertype__", None) + supertype = getattr(typ, "__supertype__", None) if ( supertype is not None and getattr(typ, "__qualname__", "") == "NewType..new_type"