mypy doesn't check f-strings conversions
Open
Nobody has claimed this yet.
feature
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
f"{None:%d/%m/%Y}" # runtime error
f"{'':1f}" # runtime error
https://mypy-play.net/?mypy=latest&python=3.10&gist=a4528c444b265cd524ec3a6f2bce3b10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two examples in the linked mypy-play playground with Python 3.10 and the latest mypy. Trace how mypy handles the f-string conversions, then verify that invalid conversions are diagnosed rather than reaching the shown runtime errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100