Skip to content
Prev Previous commit
Next Next commit
ref: add blank lines between methods
  • Loading branch information
uburuntu committed Aug 11, 2020
commit c0f1b6238a5aff8fda95d86dcfe3ea8afa866fd6
4 changes: 4 additions & 0 deletions Lib/contextlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,16 @@ class closing(AbstractContextManager, AbstractAsyncContextManager):
"""
def __init__(self, thing):
self.thing = thing

def __enter__(self):
return self.thing

def __exit__(self, *exc_info):
self.thing.close()

async def __aenter__(self):
return self.thing

async def __aexit__(self, *exc_info):
await self.thing.aclose()

Expand Down