Conversation
Contributor
Author
|
What is the purpose of the abstract method here? Clearly the issue I tried to address is a design feature, but I was not able to figure it out. |
Collaborator
|
Hi @jlvdb - thanks for looking at this! I'm not quite clear what you mean by your question - could you explain more? |
Contributor
Author
|
Hi @joezuntz, I did not really understand this line here: Line 293 in 5c683f8 Since the it checks for isabstractmethod, I thought that the @AbstractMethod serves a purpose beyond indicating an abstract method that should be overwritten, since suddenly the unit tests were failing. |
Collaborator
|
I don't really remember the details here, but I think the main reason I didn't go full-on with using the ABC superclass was that the error messages were much less informative for a typical user. So I guess I was manually using this test to make sure that the user overrode stuff so I could give a more useful custom error message. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull requests adds
abc.ABCas meta classes forPipelineandPipelineStage.Both classes implement a few abstract methods, however they do not use
abc.ABCas meta class, which would prevent to instantiate a subclass if it does not properly implement the abstract methods. Currently aNotImplementedErroris raised at a later point during runtime.