from dataclasses import is_dataclass
def f(X: type) -> None:
if is_dataclass(X):
reveal_type(X) # information: Type of "X" is "type"
Should this be the typeshed type type[DataclassInstance]? As far as I can tell, this is
class DataclassInstance(Protocol):
__dataclass_fields__: ClassVar[dict[str, dataclasses.Field[Any]]]
Related typing-sig post.