KotlinIsland / KotlinIsland/basedmypy
Wacky `dict` `reveal_type` moment
Open
bug
- Dominant language
- Python
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```py
a = reveal_type({ # Revealed type is "dict['C' | 'D', None]"
"A": None,
"B": None,
"C": None,
"D": None,
})
reveal_type(a) # Revealed type is "dict[str, None]"
```
Contributor guide
Research direction
Start by running the provided snippet through basedmypy and compare the inline and subsequent reveal_type results. Trace the dictionary-literal type inference to determine why the two outputs differ; done means the behavior is explained or corrected and covered by a regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100