I have a function that accepts an instance of any dataclass. what would be an appropriate type hint for it ? haven't found something official in the python documentation this is what I have been doing, but i don't think it's correct from typing import Any, NewType DataClass = NewType('DataClass', Any) def foo(obj: DataClass): ... another idea is to use a Protocol with these class attributes __dataclass_fields__, __dataclass_params__. Continue reading...