Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Update error message for incompatible args #6796
Updated the error message that is displayed when the argument types of a method in a subclass are incompatible with the arguments of the same method in the superclass.
Since the output message has changed there are quite a few broken tests. I would like to review and agree on the wording before changing them.
# sample.py class A: def kek(self, lol: int = 0) -> None: print("Kek in A") class B(A): def kek(self, haha: str = "") -> None: super().kek(1) print("Kek in B")
mypy sample.py sample.py:11: error: Argument 1 of "kek" incompatible with supertype "A"
As pointed out by @ilevkivskyi incompatible return type error reporting could also benefit from the same treatment. Will enter a followup issue once this is merged.