Closed
Description
Steps to reproduce
def foo():
@asynccontextmanager
async def wrapper(*args, **kwargs):
pass
return wrapper
async with foo():
pass
E1701: Async context manager 'wrapper' doesn't implement __aenter__ and __aexit__. (not-async-context-manager)
The troubling thing is that foo()
is part of a public API, which means every project using it would need to suppress not-async-context-manager.
pylint --version output
pylint 2.6.0
astroid 2.4.2
Python 3.8.2 (default, Jun 15 2020, 10:47:09)
[Clang 9.0.0 (clang-900.0.39.2)]