Skip to content

Update "super" usage#703

Merged
rahulporuri merged 1 commit into
masterfrom
ref/update-super-usage
Apr 21, 2021
Merged

Update "super" usage#703
rahulporuri merged 1 commit into
masterfrom
ref/update-super-usage

Conversation

@rahulporuri
Copy link
Copy Markdown
Contributor

On Python 3, we dont need to pass any arguments to super in the usual case where we are simply calling super with the defining class. This PR removes such instances.

Note that the changes were made using automated regex-based search and replace, similar to enthought/traits#1280. After the changes were made, we checked each of the changes to ensure that we not passing a different class when calling super than the defining class e.g. calling super(A, self) in class B where B inherits from A. There were a few such instances discovered in the code - which will be addressed in a later PR.

On Python 3, we dont need to pass any arguments to super
Copy link
Copy Markdown
Contributor

@aaronayres35 aaronayres35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rahulporuri rahulporuri merged commit 4c0d66c into master Apr 21, 2021
@rahulporuri rahulporuri deleted the ref/update-super-usage branch April 21, 2021 00:47
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