KotlinIsland / KotlinIsland/basedmypy
f-strings with unformattable values can break inferred literals in overloads
Open
bug
p-1
- Dominant language
- Python
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```py
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)
```
Contributor guide
Research direction
Start by running the Python reproducer with basedmypy and inspect the checker paths for f-string inference and overload resolution. Determine the intended inferred type for the formatted value and verify that the overload result no longer changes incorrectly for an unformattable value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100