KotlinIsland / KotlinIsland/basedmypy
Should be able to use covariant type on parameter on classmethod
Open
feature
- Dominant language
- Python
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```py
from typing import *
out_T = TypeVar("out_T", covariant = True)
class A(Generic[out_T]):
@classmethod
def f(cls, t: out_T) -> None:
print("hi")
```
Contributor guide
Research direction
The issue provides only a Python reproduction using Generic, TypeVar, and @classmethod; start by checking how basedmypy currently analyzes that example and what diagnostic it produces. No files or tests are named, so identify the relevant type-checking entry point and add coverage showing the example is accepted without regressing related variance checks.
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
- 35/100