mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
19 lines
641 B
Python
19 lines
641 B
Python
from collections.abc import Callable, Sequence
|
|
from typing import Any, TypeVar, overload, type_check_only
|
|
|
|
from typing_extensions import Self
|
|
|
|
# Contains additions from a class being decorated with '@deconstructible'
|
|
@type_check_only
|
|
class _Deconstructible:
|
|
def __new__(cls, *args: Any, **kwargs: Any) -> Self: ...
|
|
def deconstruct(obj) -> tuple[str, Sequence[Any], dict[str, Any]]: ...
|
|
|
|
_T = TypeVar("_T")
|
|
_TCallable = TypeVar("_TCallable", bound=Callable[..., Any])
|
|
|
|
@overload
|
|
def deconstructible(_type: type[_T]) -> type[_T]: ...
|
|
@overload
|
|
def deconstructible(*, path: str | None = None) -> Callable[[_TCallable], _TCallable]: ...
|