KotlinIsland / KotlinIsland/basedmypy
show "narrowed from" for members
Open
feature
- Dominant language
- Python
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```py
class A:
a: object
class B(A):
a: int
a: A
a = B()
reveal_type(a.a) # N: Revealed type is "int"
# Actually expected N: Revealed type is "int" (narrowed from "object")
```
Contributor guide
Research direction
Start by reproducing the shown Python example with classes A and B and the reveal_type(a.a) check. Trace the type-checker path that produces the revealed member type, then update its output so it reports "int" narrowed from "object" and verify the example's expected note.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100