KotlinIsland / KotlinIsland/basedmypy
infer types from index access using a literal index
Open
topic-inference
- Dominant language
- Python
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```py
reveal_type([0][0]) # currently int, could be 0
```
_Originally posted by @KotlinIsland in https://github.com/KotlinIsland/basedmypy/pull/340#discussion_r912623393_
Contributor guide
Research direction
Start with the issue's reveal_type([0][0]) example and trace how literal index access is inferred. Done means the revealed type is narrowed from int to the literal 0, with regression coverage for this behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100