Closed
Description
from typing import Callable, MutableMapping, ClassVar
class C:
x: ClassVar[Callable[[], MutableMapping]] = dict
def f(self) -> MutableMapping:
return self.x()
c = C()
print(c.f())
Gives
a.py:6: error: Attribute function "x" with type "Callable[[], MutableMapping[Any, Any]]" does not accept self argument