Works at runtime, two mypy errors: ```python from cachetools.func import ttl_cache @ttl_cache(ttl=0.100, maxsize=10) # Argument 1 has incompatible type "Callable[[str], int]"; expected <nothing> def foo(lol: str) -> int: return int(lol) print(foo("123")) # <nothing> not callable ``` But it works if I change the first lines to this: ```python from cachetools import cached, TTLCache @cached(TTLCache(ttl=0.100, maxsize=10)) ```
Activity
srittau commentedon Jun 11, 2021
We should try using
Callable[[_F], _F]directly, instead of using_RET[_F].hauntsaninja commentedon Jun 11, 2021
Same deal as #5482 (and broken by the same change)
AB#8701 Pin MyPy to version 0.812.
AB#8701 Pin MyPy to version 0.812.
AB#8701 Pin MyPy to version 0.812.
AB#8701 Pin MyPy to version 0.812.
AB#8701 Pin MyPy to version 0.812.
AB#8701 Pin MyPy to version 0.812.
AB#8701 Pin MyPy to version 0.812.
AB#8701 Pin MyPy to version 0.812.
AB#8701 Pin MyPy to version 0.812.
AB#8701 Pin MyPy to version 0.812.