File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 11import sys
2- from collections .abc import Callable
32from typing import Any , Protocol , TypeVar
4- from typing_extensions import Self
3+ from typing_extensions import ParamSpec , Self
54
65__all__ = ["Error" , "copy" , "deepcopy" ]
76
87_T = TypeVar ("_T" )
9- _SR = TypeVar ("_SR" , bound = _SupportsReplace )
8+ _SR = TypeVar ("_SR" , bound = _SupportsReplace [Any ])
9+ _P = ParamSpec ("_P" )
1010
11- class _SupportsReplace (Protocol ):
12- __replace__ : Callable [..., Self ]
11+ class _SupportsReplace (Protocol [_P ]):
12+ # In reality doesn't support args, but there's no other great way to express this.
13+ def __replace__ (self : Self , * args : _P .args , ** kwargs : _P .kwargs ) -> Self : ...
1314
1415# None in CPython but non-None in Jython
1516PyStringMap : Any
You can’t perform that action at this time.
0 commit comments