KotlinIsland / KotlinIsland/basedmypy

Should be able to use covariant type on parameter on classmethod

Open
#679 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.