Closed
Description
- Are you reporting a bug, or opening a feature request? Bug
- Please insert below the code you are checking with mypy,
from typing import TypeVar, Type
T = TypeVar("T", bound="A")
class A:
@classmethod
def foo(cls: Type[T]) -> T:
print(cls.__qualname__)
return cls()
class B(A):
@classmethod
def foo(cls: Type[T]) -> T:
return super().foo()
B.foo()
- What is the actual behavior/output?
scratch.py:14: error: Returning Any from function declared to return "T"
scratch.py:14: error: Argument 2 for "super" not an instance of argument 1
- What are the versions of mypy and Python you are using?
Python 3.8.5
mypy 0.790+dev.5e9682143720263466f0aaed1924ccb218160ee0
Do you see the same issue after installing mypy from Git master? Yes - What are the mypy flags you are using? --strict