-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Catch incomplete TypeVisitor implementations #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the PR! We'll need to provide the missing implementations before merging this to master so that tests will pass. If you are not working on that, I can do it, maybe this weekend. Just want to make sure that there's no duplicate work. |
I'm not working on the missing implementations, it looks like it would require a much better understanding of mypy's model of the type system than I have... |
b3bb5c2
to
749bb56
Compare
Use the @AbstractMethod decorator on abstract methods which are implemented in all subtypes. Part of python#730
This helps to point out the offending unimplemented abstract methods in subtypes. Part of python#730.
749bb56
to
f577a25
Compare
Sorry, I had missed the update, thanks! I manually rebased this to master (github isn't clever enough to notice that it's in). |
Use the
@abstractmethod
decorator on abstract methods. Part of #730This breaks all tests as the
@abstractmethod
raises a runtime exception on instantiation of a subclass with unimplemented abstract methods. We need to provide complete implementations for these in order to get the tests to pass.Subclasses with incomplete implementations are: