Skip to content

Shouldn't Pyright fail subclasses that don't override @abstractmethod? #9368

Answered by erictraut
Kache asked this question in Q&A
Discussion options

You must be logged in to vote

Pyright is working correctly here. The class definition of B is fine. You can create subclasses of B that provide the missing abstract method implementation.

If you attempt to instantiate B, pyright will report an error. Also, if you mark B as @final, then pyright will report an error.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Kache
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants