Skip to content

Instantly share code, notes, and snippets.

@MathiasSven
MathiasSven / type_covariance.py
Last active April 29, 2022 19:15 — forked from mypy-play/main.py
`type[T]` covariance issues
from __future__ import annotations
from contextlib import suppress
from typing import Any, ClassVar
from typing_extensions import reveal_type
class Foo: ...
class SubFoo(Foo):
def bar(self) -> int: return 5