Skip to content

--warn-return-any should not complain on NotImplemented when using abc #4534

Closed
@drtyrsa

Description

@drtyrsa

I'm using abc.abstractmethod:

@abc.abstractmethod
def encode(self) -> bytes:
    return NotImplemented

And I get a warning: warning: Returning Any from function declared to return "bytes"

I don't think something is wrong with the code, it's totally normal way to declare and describe an interface and mypy shouldn't complain about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions