KotlinIsland / KotlinIsland/basedmypy
infer literal generics
Open
topic-inference
- Dominant language
- Python
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```py
def f[T](t: T) -> T: ..
f(1) # int, should be 1
```
Contributor guide
Research direction
Start by reproducing the generic function example in basedmypy and trace how its type inference handles the call f(1). Done means the inferred result preserves the literal value as 1 rather than widening it to int.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100