KotlinIsland / KotlinIsland/basedmypy
Enforce class members are initialized
Open
feature
p-2
- Dominant language
- Python
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```py
class A:
a: int
def __init__(self, a: int):
print("LOOL!")
print(A(1).a)
```
I would expect an error:
`a: int # no default value and not set in initializer`
Contributor guide
Research direction
The issue names no implementation file or test, so begin by locating the checker logic for annotated class members and constructor analysis. Use the A example as the reproducer; done means the checker reports that a has no default value and is not assigned during initialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100