File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -295,19 +295,6 @@ def factory() -> ClientConnection:
295
295
296
296
self ._open_timeout = open_timeout
297
297
298
- # async with connect(...) as ...: ...
299
-
300
- async def __aenter__ (self ) -> ClientConnection :
301
- return await self
302
-
303
- async def __aexit__ (
304
- self ,
305
- exc_type : type [BaseException ] | None ,
306
- exc_value : BaseException | None ,
307
- traceback : TracebackType | None ,
308
- ) -> None :
309
- await self .connection .close ()
310
-
311
298
# ... = await connect(...)
312
299
313
300
def __await__ (self ) -> Generator [Any , None , ClientConnection ]:
@@ -333,6 +320,19 @@ async def __await_impl__(self) -> ClientConnection:
333
320
334
321
__iter__ = __await__
335
322
323
+ # async with connect(...) as ...: ...
324
+
325
+ async def __aenter__ (self ) -> ClientConnection :
326
+ return await self
327
+
328
+ async def __aexit__ (
329
+ self ,
330
+ exc_type : type [BaseException ] | None ,
331
+ exc_value : BaseException | None ,
332
+ traceback : TracebackType | None ,
333
+ ) -> None :
334
+ await self .connection .close ()
335
+
336
336
337
337
def unix_connect (
338
338
path : str | None = None ,
You can’t perform that action at this time.
0 commit comments