Update super usage in potentially buggy cases#790
Merged
Conversation
added 3 commits
April 21, 2021 04:26
we were using `super(Container, self)` from inside `Canvas`, which seems like an unintentional bug
rahulporuri
commented
Apr 21, 2021
aaronayres35
approved these changes
Apr 21, 2021
| unittest.TestCase): | ||
| def setUp(self): | ||
| super(HoverToolTestCase, self).setUp() | ||
| GuiTestAssistant.setUp(self) |
Contributor
There was a problem hiding this comment.
Same question I had on the other PR, why exactly do we purposefully avoid super for setUp
Contributor
Author
There was a problem hiding this comment.
answered elsewhere - part convention, part best practice - especially because we have cases where we need to call setUp on more than one base class.
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.
See related #789
This PR updates a few calls to
superthat were potentially buggy. In these two cases for example, we were callingsuper(A, self)from classBwhereBinherits fromA. We first update thesupercalls to use the correct class argument - and then update thesupercall to remove the arguments altogether.