Skip to content

Replace GObject.GObject() with super().__init__() - #1089

Open
Dakshsharma1108 wants to merge 2 commits into
sugarlabs:gtk4-portfrom
Dakshsharma1108:gtk4
Open

Replace GObject.GObject() with super().__init__()#1089
Dakshsharma1108 wants to merge 2 commits into
sugarlabs:gtk4-portfrom
Dakshsharma1108:gtk4

Conversation

@Dakshsharma1108

@Dakshsharma1108 Dakshsharma1108 commented Mar 22, 2026

Copy link
Copy Markdown

Replace GObject.GObject() with super().__init__()

Summary

Modernize GObject initialization in 30 instances across 27 files by replacing GObject.GObject.__init__(self) with super().__init__().

Changes

  • Replaces old-style GObject initialization with Python 3 standard super() pattern
  • Covers both super().__init__() and super().__init__(**kwargs) patterns
  • No functional changes; fully backward compatible

@Dakshsharma1108

Dakshsharma1108 commented Mar 22, 2026

Copy link
Copy Markdown
Author

Please review @quozl @chimosky :)

@chimosky

Copy link
Copy Markdown
Member

Having tests for this is overkill, we know what to expect with the change.

In the future, view your changes using git diff so you can avoid issues like no new line at EOF in the test file.

@Dakshsharma1108

Copy link
Copy Markdown
Author

Got it, I’ll remove the test file and keep this in mind for future changes.

@Dakshsharma1108

Dakshsharma1108 commented Mar 24, 2026

Copy link
Copy Markdown
Author

you can review it now :)

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.

2 participants