You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting in v2.13.0 pylint reports warning if you decorate a method with lru_cache but do not provide a value for maxsize (#5670) . It does this even if you omit a value for maxsize and just use @lru_cache or @lru_cache().
This is incorrect, the lru_cache decorator defaults maxsize to 128 if omitted so it should not warn about this. It should only warn if maxsize is explicitly set to None by doing @lru_cache(maxsize=None) as that is what can create memory leaks.
Configuration
No response
Command used
pylint supervisor/host/manager.py
Pylint output
************* Module supervisor.host.manager
supervisor/host/manager.py:71:5: W1516: 'lru_cache' without 'maxsize' will keep all method args alive indefinitely, including 'self' (lru-cache-decorating-method)
Expected behavior
No warning since we are using the default maxsize of 128.
Pylint version
pylint 2.13.4
OS / Environment
macOS 12.2.1
Python 3.10.2
pip 22.0.4
Additional dependencies
No response
The text was updated successfully, but these errors were encountered:
Bug description
Starting in
v2.13.0
pylint reports warning if you decorate a method withlru_cache
but do not provide a value formaxsize
(#5670) . It does this even if you omit a value formaxsize
and just use@lru_cache
or@lru_cache()
.This is incorrect, the
lru_cache
decorator defaults maxsize to 128 if omitted so it should not warn about this. It should only warn ifmaxsize
is explicitly set toNone
by doing@lru_cache(maxsize=None)
as that is what can create memory leaks.Configuration
No response
Command used
Pylint output
Expected behavior
No warning since we are using the default maxsize of 128.
Pylint version
OS / Environment
macOS 12.2.1
Python 3.10.2
pip 22.0.4
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: