mypy icon indicating copy to clipboard operation
mypy copied to clipboard

(🐞) No error for invalid `super` call inside an inner function

Open KotlinIsland opened this issue 3 years ago • 0 comments

class A:
    def foo(self):
        pass


class B(A):
    def foo(self):
        def inner():
            super().foo()   # RuntimeError: super(): no arguments

        inner()


B().foo()

playground

KotlinIsland avatar Jan 17 '23 01:01 KotlinIsland