cache-max-size-none / W1517ΒΆ

Message emitted:

'lru_cache(maxsize=None)' will keep all method args alive indefinitely, including 'self'

Description:

By decorating a method with lru_cache the 'self' argument will be linked to the lru_cache function and therefore never garbage collected. Unless your instance will never need to be garbage collected (singleton) it is recommended to refactor code to avoid this pattern or add a maxsize to the cache.The default value for maxsize is 128.

Created by stdlib checker