KotlinIsland / KotlinIsland/basedmypy
Support lower generic bounds
Open
feature
generic modifier
- Dominant language
- Python
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```py
class A[LowerBound[T, int]]: ...
A[object] # ok
A[int] # ok
A[bool] # nah
```
# mypy in real life
```py
class list[T]:
def copy[R: lower=T](self) -> list[R]: ...
a: list[int]
b: list[object] = a.copy() # okay, R is inferred as object
```
Contributor guide
Research direction
No file or test path is named. Start by locating the implementation and tests for generic type parameters and constraints, then compare existing bound handling with the LowerBound[T, int] and lower=T examples. Done means the examples produce the stated accepted and rejected results, with regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100