Closed
Description
This doesn't give any error:
class C:
def foo(self: int) -> None:
pass
C().foo()
We ran into this in PY2 mode: Benjamin removed an argument from a method but forgot to remove it from the # type
signature, and then realized that mypy didn't catch that. The PY2 form of signatures in # type
comments doesn't require a type corresponding to self but it allows it, so his mistake effectively boiled down to the above example. Why isn't this an error?