mirror of
https://github.com/stoatchat/python-client-sdk.git
synced 2026-07-22 02:25:22 -04:00
19 lines
335 B
Python
Executable File
19 lines
335 B
Python
Executable File
from typing import Callable, TypeVar
|
|
|
|
__all__ = ("Missing", "copy_doc")
|
|
|
|
class _Missing:
|
|
def __repr__(self):
|
|
return "<Missing>"
|
|
|
|
Missing = _Missing()
|
|
|
|
T = TypeVar("T")
|
|
|
|
def copy_doc(from_t: T) -> Callable[[T], T]:
|
|
def inner(to_t: T) -> T:
|
|
to_t.__doc__ = from_t.__doc__
|
|
return to_t
|
|
|
|
return inner
|