I found this surprising and arguably incorrect. According to mypy: ```python from typing import Any from dataclasses import is_dataclass def example1(arg: Any) -> None: if is_dataclass(arg): reveal_type(arg) # ❌ Revealed type is "type[_typeshed.DataclassInstance]" def example2(arg: object) -> None: if is_dataclass(arg): reveal_type(arg) # ✅ Revealed type is "Union[_typeshed.DataclassInstance, type[_typeshed.DataclassInstance]]" ``` [(Mypy playground)](https://mypy-play.net/?mypy=latest&python=3.12&gist=3cb374974a1ca716a0d27c749921ddd4) This is because `Any` matches the 1st overload, even if 2nd overload with `object` argument is more appropriate for `Any`: ```python @overload def is_dataclass(obj: type) -> TypeIs[type[DataclassInstance]]: ... @overload def is_dataclass(obj: object) -> TypeIs[DataclassInstance | type[DataclassInstance]]: ... ``` I couldn't think of an elegant fix for this.