Open DetachHead opened 5 months ago
actually it's not just contextmanager
, but any other decorator:
from typing import Callable
def foo[**P, T](fn: Callable[P, T]) -> Callable[P, T]:
return fn
class Bar:
@property
def asdf(self) -> int:
return 2
class Baz(Bar):
@property
def asdf(self) -> str: # no error
return ""
@asdf.setter
@foo
def asdf(self, new_value: str) -> None: ...
playground
removing the
@foo()
decorator makes the error appear: