-
Notifications
You must be signed in to change notification settings - Fork 95
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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