from __future__ import annotations import typing class T(typing.NamedTuple): a: int b: int print(typing.get_type_hints(T.__new__))