KotlinIsland / KotlinIsland/basedmypy
only narrow locally defined variables
Open
feature
- Dominant language
- Python
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```py
foo: int | None = None
def bar():
global foo
foo = None
baz()
if foo is None: # error: condition is always True
...
def baz():
global foo
foo = 1
```
Contributor guide
Research direction
No files or tests are named; use the Python reproducer in issue #345 as the starting test case. Trace how the checker narrows global foo across bar(), baz(), and the global assignment. Done means the condition is not reported as always true while narrowing of locally defined variables remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100