Skip to content

Commit

Permalink
bpo-38415: Remove redundant AsyncContextDecorator.__call__ override f…
Browse files Browse the repository at this point in the history
…rom _AsyncGeneratorContextManager (GH-30233)
  • Loading branch information
graingert committed Feb 26, 2022
1 parent e466faa commit b57dbe5
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions Lib/contextlib.py
Expand Up @@ -193,14 +193,6 @@ class _AsyncGeneratorContextManager(
):
"""Helper for @asynccontextmanager decorator."""

def __call__(self, func):
@wraps(func)
async def inner(*args, **kwds):
async with self.__class__(self.func, self.args, self.kwds):
return await func(*args, **kwds)

return inner

async def __aenter__(self):
# do not keep args and kwds alive unnecessarily
# they are only needed for recreation, which is not possible anymore
Expand Down

0 comments on commit b57dbe5

Please sign in to comment.