Skip to content
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

Use python3 style super consistently #199

Merged
merged 1 commit into from
Jul 6, 2021
Merged

Conversation

osamuaoki
Copy link
Contributor

Static syntax checker flagged layout_listbox_example.py at:
super(Gtk.ListBoxRow, self).init()
as:
bad-super-call: Bad first argument 'ListBoxRow' given to super()

This got me to check recent python3 situation.
https://docs.python.org/3.9/library/functions.html#super
https://rhettinger.wordpress.com/2011/05/26/super-considered-super/

After reading this and updating this part of code, I also realized all
subclass of Gtk.Window except one in popover_advanced_example.py were
not using super() but calling it directly in the subclass's init.
Not so nice.

I decided to fix them all for cleaner consistency.

Signed-off-by: Osamu Aoki osamu@debian.org

Static syntax checker flagged layout_listbox_example.py at:
    super(Gtk.ListBoxRow, self).__init__()
as:
    bad-super-call: Bad first argument 'ListBoxRow' given to super()

This got me to check recent python3 situation.
    https://docs.python.org/3.9/library/functions.html#super
    https://rhettinger.wordpress.com/2011/05/26/super-considered-super/

After reading this and updating this part of code, I also realized all
subclass of Gtk.Window except one in popover_advanced_example.py were
not using super() but calling it directly in the subclass's __init__.
Not so nice.

I decided to fix them all for cleaner consistency.

Signed-off-by: Osamu Aoki <osamu@debian.org>
@sebp
Copy link
Owner

sebp commented Jul 6, 2021

Thanks for your help!

@sebp sebp closed this Jul 6, 2021
@sebp sebp reopened this Jul 6, 2021
@sebp sebp merged commit 702d924 into sebp:master Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants