Skip to content

Type error when calling methods of protocol superclass #7160

Closed

Description

Describe the bug

In previous versions of pyright the below code didn't have any type errors.

class Base(Protocol):
    def get_data(self):
        ...

class MyMixin:
    def get(self: Base):
        self.get_data()
        super().get_data()

But at least since v1.1.348 (and also the current v1.1.348) the last line (super().get_data()) leads to the error (as mentioned in the discussions):

error: Method "get_data" cannot be called because it is abstract and unimplemented (reportAbstractUsage)

VS Code extension or command-line

Currently running Pyright v1.1.349 from the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    addressed in next versionIssue is fixed and will appear in next published versionbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions