With this code:
class Klass:
def method1(self):
print(self.attr)
def method2(self) -> None:
print(self.attr)
def method3(self, arg: int):
print(self.attr)
mypy complains about method2 and method3, but not method1:
x.py: note: In member "method2" of class "Klass":
x.py:7: error: "Klass" has no attribute "attr"
x.py: note: In member "method3" of class "Klass":
x.py:10: error: "Klass" has no attribute "attr"
Now looking at #1415 I thought adding --check-untyped-defs would help ("type check the interior of functions without type annotations"), but the output doesn't change with that argument. Am I missing something?