Add missing calls to super class "__init__"s#1693
Conversation
and fix a flake8 error modified: traitsui/editors/array_editor.py modified: traitsui/qt4/ui_panel.py
see #1674 modified: traitsui/qt4/ui_panel.py
|
One of the CI jobs failed with the following weird/cryptic message while running the integration tests. Restarting the jobs to see if this is intermittent. |
This just happened on #1674 as well... 🤔 |
There was a problem hiding this comment.
LGTM
My only question is how did you decide where to place the call to super within the body of the method?
Unsure about the CI failures though. Re-triggering CI seemed to fix the issue on #1674, but it doesn't look like that is the case here.
I was trying to do it as close to the top of the method as possible - while also setting any arguments on the class that were passed through. |
…issing-super-calls
Previously, we were setting traits/attributes before calling __init__ on the objects, which setup the traits machinery. Instead, this commit passes the arguments to __init__, which feels like the right thing to do modified: traitsui/editors/array_editor.py modified: traitsui/editors/tuple_editor.py modified: traitsui/qt4/ui_panel.py
|
@aaronayres35 given your comment, i went with a slightly different approach to this PR - i passed the incoming arguments to the super |
|
given the changes, would you like to do another review of this PR @aaronayres35 ? |
aaronayres35
left a comment
There was a problem hiding this comment.
Still LGTM, thank you!
This PR adds missing calls to
super().__init__()in a few classes which overrided__init__methods of their base classes.Checklist