Bug Report
I'm getting a false positive from the following example
fromtypingimportProtocolfromtyping_extensionsimportSelfclassP(Protocol):
# Removing the property makes the problem disappear@propertydefx(self) ->int: ...
defclone(self) ->Self: ...
classA:
defclone(self) ->Self:
returnselfclassB(A, P):
@propertydefx(self) ->int:
return100
main.py:18: error: Definition of "clone" in base class "A" is incompatible with definition in base class "P" [misc]
Obviously, A.clone does not actually clone the instance, but that is left out for clarity.
The false positive is not reported when I remove the property x from the protocol P.
To Reproduce
https://mypy-play.net/?mypy=latest&python=3.12&gist=fe15d8bc18aa7b61feb3e56fce615f47
Bug Report
I'm getting a false positive from the following example
Obviously,
A.clonedoes not actually clone the instance, but that is left out for clarity.The false positive is not reported when I remove the property
xfrom the protocolP.To Reproduce
https://mypy-play.net/?mypy=latest&python=3.12&gist=fe15d8bc18aa7b61feb3e56fce615f47