caterinaurban / Typpete

34 stars 6 forks source link

Stub methods should not need type annotation for receiver parameter ("self") #22

Open marcoeilers opened 7 years ago

marcoeilers commented 7 years ago

Hm. I tried this again, and I still think it doesn't work the way it should. IMO if ignore_fully_annotated_function is set to true, the following program should be accepted:

class A:
    def do_something(self) -> int:
        return "asd"

a = A()
b = a.do_something()

But currently, it's rejected. If I add the annotation self: A, it is accepted, because do_something is now recognized as fully annotated.