@@ -42,7 +42,7 @@ class _GeneratorContextManager(AbstractContextManager[_T_co], ContextDecorator,
42
42
# In Python <= 3.6, __init__ and all instance attributes are defined directly on this class.
43
43
# In Python >= 3.7, __init__ and all instance attributes are inherited from _GeneratorContextManagerBase
44
44
# _GeneratorContextManagerBase is more trouble than it's worth to include in the stub; see #6676
45
- def __init__ (self , func : Callable [... , Iterator [_T_co ]], args : tuple [ Any , ...] , kwds : dict [ str , Any ] ) -> None : ...
45
+ def __init__ (self , func : Callable [_P , Iterator [_T_co ]], args : _P . args , kwds : _P . kwargs ) -> None : ...
46
46
gen : Generator [_T_co , Any , Any ]
47
47
func : Callable [..., Generator [_T_co , Any , Any ]]
48
48
args : tuple [Any , ...]
@@ -57,15 +57,15 @@ if sys.version_info >= (3, 10):
57
57
class _AsyncGeneratorContextManager (AbstractAsyncContextManager [_T_co ], AsyncContextDecorator , Generic [_T_co ]):
58
58
# __init__ and these attributes are actually defined in the base class _GeneratorContextManagerBase,
59
59
# which is more trouble than it's worth to include in the stub (see #6676)
60
- def __init__ (self , func : Callable [... , AsyncIterator [_T_co ]], args : tuple [ Any , ...] , kwds : dict [ str , Any ] ) -> None : ...
60
+ def __init__ (self , func : Callable [_P , AsyncIterator [_T_co ]], args : _P . args , kwds : _P . kwargs ) -> None : ...
61
61
gen : AsyncGenerator [_T_co , Any ]
62
62
func : Callable [..., AsyncGenerator [_T_co , Any ]]
63
63
args : tuple [Any , ...]
64
64
kwds : dict [str , Any ]
65
65
66
66
elif sys .version_info >= (3 , 7 ):
67
67
class _AsyncGeneratorContextManager (AbstractAsyncContextManager [_T_co ], Generic [_T_co ]):
68
- def __init__ (self , func : Callable [... , AsyncIterator [_T_co ]], args : tuple [ Any , ...] , kwds : dict [ str , Any ] ) -> None : ...
68
+ def __init__ (self , func : Callable [_P , AsyncIterator [_T_co ]], args : _P . args , kwds : _P . kwargs ) -> None : ...
69
69
gen : AsyncGenerator [_T_co , Any ]
70
70
func : Callable [..., AsyncGenerator [_T_co , Any ]]
71
71
args : tuple [Any , ...]
0 commit comments