KotlinIsland / KotlinIsland/basedmypy

show "narrowed from" for members

Open
#556 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.