Make it possible to infer Callable TypeVars, fixes #1449

This commit is contained in:
Dave Halter
2019-12-12 23:22:52 +01:00
parent 536a77551b
commit e656a5f18f
6 changed files with 101 additions and 5 deletions

View File

@@ -329,3 +329,24 @@ X.attr_y.value
X().name
#? float()
X().attr_x.attr_y.value
# -----------------
# functools Python 3.8
# -----------------
# python >= 3.8
@functools.lru_cache
def x() -> int: ...
@functools.lru_cache()
def y() -> float: ...
@functools.lru_cache(8)
def z() -> str: ...
#? int()
x()
#? float()
y()
#? str()
z()