Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no unsafe variance error on attributes #395

Open
DetachHead opened this issue Jun 6, 2024 · 1 comment
Open

no unsafe variance error on attributes #395

DetachHead opened this issue Jun 6, 2024 · 1 comment
Labels
type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules

Comments

@DetachHead
Copy link
Owner

from typing import TypeVar, Generic

T = TypeVar("T", covariant=True)

class Foo(Generic[T]):
    value: T # no error
@DetachHead DetachHead added the type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules label Jun 6, 2024
@KotlinIsland
Copy link
Collaborator

This is a well known issue, any everyone wants to pretend it doesn't exist: python/mypy#735

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules
Projects
None yet
Development

No branches or pull requests

2 participants