typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

cachetools.TTLCache: ttl parameter should be float

Open gimperiale opened this issue 6 years ago • 0 comments

The cachetools.TTLCache implementation is happy to support sub-second time-to-live. The official documentation says nothing about ttl needing to be an integer either.

import cachetools
cachetools.TTLCache(maxsize=10, ttl=0.1)

mypy 0.790 output:

2: Argument "ttl" to "TTLCache" has incompatible type "float"; expected "int"

gimperiale avatar Oct 14 '20 14:10 gimperiale