flake8-bugbear
flake8-bugbear copied to clipboard
Consider adding alru_cache to B019
The async-lru project provides a port for Python's built-in functools.lru_cache function for asyncio.
The same rules apply here with respect to garbage collection on instance methods. As this package is maintained by aio-libs it might be worth considering extending this rule to apply to uses of this decorator.
I would accept checking for this in async def functions and recommending. As always, please add tests showing it working and ignoring edge cases etc. we decide not to support etc.