File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
sqlalchemy-stubs/ext/asyncio Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 1
1
import abc
2
2
from typing import Any
3
+ from typing import Generator
4
+ from typing import TypeVar
5
+
6
+ _TStartableContext = TypeVar ("_TStartableContext" , bound = StartableContext )
3
7
4
8
class StartableContext (abc .ABC , metaclass = abc .ABCMeta ):
5
9
@abc .abstractmethod
6
- async def start (self ) -> StartableContext : ...
7
- def __await__ (self ): ...
8
- async def __aenter__ (self ): ...
10
+ async def start (self : _TStartableContext ) -> _TStartableContext : ...
11
+ def __await__ (
12
+ self : _TStartableContext ,
13
+ ) -> Generator [Any , None , _TStartableContext ]: ...
14
+ async def __aenter__ (self : _TStartableContext ) -> _TStartableContext : ...
9
15
@abc .abstractmethod
10
16
async def __aexit__ (
11
17
self , type_ : Any , value : Any , traceback : Any
12
- ) -> Any : ...
18
+ ) -> None : ...
13
19
14
20
class ProxyComparable :
15
- def __hash__ (self ) -> Any : ...
16
- def __eq__ (self , other : Any ) -> Any : ...
17
- def __ne__ (self , other : Any ) -> Any : ...
21
+ def __hash__ (self ) -> int : ...
22
+ def __eq__ (self , other : Any ) -> bool : ...
23
+ def __ne__ (self , other : Any ) -> bool : ...
You can’t perform that action at this time.
0 commit comments