KotlinIsland / KotlinIsland/basedmypy
conditional expressions don't apply always true logic
Open
bug
- Dominant language
- Python
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```py
from typing import TYPE_CHECKING
b = 1 if TYPE_CHECKING else ""
reveal_type(b) # int | str
```
Contributor guide
Research direction
Start by reproducing the issue's Python snippet and trace how conditional expressions handle TYPE_CHECKING in the type-checking logic. Identify the relevant implementation and tests for conditional-expression inference; done means the revealed type reflects TYPE_CHECKING's always-true behavior instead of int | str.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100