basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

f-strings with unformattable values can break inferred literals in overloads

Open KotlinIsland opened this issue 1 year ago • 0 comments

from typing import overload


@overload
def f(): ...


@overload
def f(s: str, a: True = ...): ...


def f(s="", a=True): ...


v: None

f(f"{v}", True)

KotlinIsland avatar Feb 21 '24 06:02 KotlinIsland