diff --git a/django-stubs/utils/deconstruct.pyi b/django-stubs/utils/deconstruct.pyi index 51f1b3678..67853a661 100644 --- a/django-stubs/utils/deconstruct.pyi +++ b/django-stubs/utils/deconstruct.pyi @@ -1,3 +1,11 @@ -from typing import Any +from collections.abc import Callable +from typing import Any, TypeVar, overload -def deconstructible(*args: Any, path: Any | None = ...) -> Any: ... +T = TypeVar("T") + +@overload +def deconstructible(klass: type[T]) -> type[T]: ... +@overload +def deconstructible( + *args: Any, path: str | None = ... +) -> Callable[[type[T]], type[T]]: ...