| 1 |
import sys |
| 2 |
from typing import Any, Protocol, TypeVar, type_check_only |
| 3 |
|
| 4 |
__all__ = ["Error", "copy", "deepcopy"] |
| 5 |
|
| 6 |
_T = TypeVar("_T") |
| 7 |
_RT_co = TypeVar("_RT_co", covariant=True) |
| 8 |
|
| 9 |
@type_check_only |
| 10 |
class _SupportsReplace(Protocol[_RT_co]): |
| 11 |
|
| 12 |
def __replace__(self, /, *_: Any, **changes: Any) -> _RT_co: ... |
| 13 |
|
| 14 |
|
| 15 |
PyStringMap: Any |
| 16 |
|
| 17 |
|
| 18 |
def deepcopy(x: _T, memo: dict[int, Any] | None = None, _nil: Any = []) -> _T: ... |
| 19 |
def copy(x: _T) -> _T: ... |
| 20 |
|
| 21 |
if sys.version_info >= (3, 13): |
| 22 |
__all__ += ["replace"] |
| 23 |
|
| 24 |
def replace(obj: _SupportsReplace[_RT_co], /, **changes: Any) -> _RT_co: ... |
| 25 |
|
| 26 |
class Error(Exception): ... |
| 27 |
|
| 28 |
error = Error |