basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

infer parameter types of inner function from usages

Open KotlinIsland opened this issue 1 year ago • 0 comments

def outer():
    def inner(a, b, c):
        reveal_type(a)  # int
        reveal_type(b)  # str
        reveal_type(c)  # int | str

    inner(1, "a", "b")
    inner(2, "c", 3)

What about private functions as well?

KotlinIsland avatar Feb 09 '24 05:02 KotlinIsland