KotlinIsland / KotlinIsland/basedmypy
Show better type suggestions for generic stdlib types (PEP 585)
- Dominant language
- Python
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```py
a = set()
```
```
error: Need type annotation for "a" (hint: "a: Set[] = ...") [var-annotated]
```
If python-version >= 3.9 then it would be better to show something like
```
error: Cannot infer type parameter for "a" (hint: "a = set[]") [var-annotated]
```
Contributor guide
Research direction
Start by locating the diagnostic generation for the var-annotated error and the handling of the configured Python version. Compare the current Set hint with the requested PEP 585 form for Python 3.9 and newer; done when the suggestion uses the requested generic syntax only for those versions and existing behavior remains unchanged otherwise.
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
- 45/100