mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-25 02:57:14 +08:00
stdlib: Add several missing __(deep)copy__ methods (#7242)
This commit is contained in:
@@ -635,6 +635,8 @@ class Match(Generic[AnyStr]):
|
||||
def __getitem__(self, __key: _Literal[0]) -> AnyStr: ...
|
||||
@overload
|
||||
def __getitem__(self, __key: int | str) -> AnyStr | Any: ...
|
||||
def __copy__(self) -> Match[AnyStr]: ...
|
||||
def __deepcopy__(self, __memo: Any) -> Match[AnyStr]: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
||||
|
||||
@@ -658,6 +660,8 @@ class Pattern(Generic[AnyStr]):
|
||||
def subn(self, repl: AnyStr, string: AnyStr, count: int = ...) -> tuple[AnyStr, int]: ...
|
||||
@overload
|
||||
def subn(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ...) -> tuple[AnyStr, int]: ...
|
||||
def __copy__(self) -> Pattern[AnyStr]: ...
|
||||
def __deepcopy__(self, __memo: Any) -> Pattern[AnyStr]: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user