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

ReviewBot: use super().check_source_submission() in subclasses. #685

Merged
merged 1 commit into from Feb 14, 2017

Conversation

@jberry-suse
Copy link
Contributor

jberry-suse commented Feb 10, 2017

No need to duplicate the log message in multiple places.

No need to duplicate the log message in multiple places.
@coveralls

This comment has been minimized.

Copy link

coveralls commented Feb 10, 2017

Coverage Status

Coverage remained the same at 45.346% when pulling 92a5f60 on jberry-suse:ReviewBot-super into 6eefb42 on openSUSE:master.

@@ -135,7 +135,7 @@ def rdiff_link(self, src_project, src_package, src_rev, target_project, target_p
}

def check_source_submission(self, src_project, src_package, src_rev, target_project, target_package):
self.logger.info("%s/%s@%s -> %s/%s"%(src_project, src_package, src_rev, target_project, target_package))
super(Leaper, self).check_source_submission(src_project, src_package, src_rev, target_project, target_package)

This comment has been minimized.

Copy link
@lnussel

lnussel Feb 14, 2017

Member

just curious, is there an elegant way in python to avoid hardcoding the name of the class?

This comment has been minimized.

Copy link
@aplanas

aplanas Feb 14, 2017

Contributor

In python 3 this parameter is not there anymore, and in python 2 this is the expected way : (

This comment has been minimized.

Copy link
@okurz

okurz Feb 14, 2017

Member

IMHO in python3 you can just leave out the argument. For python2 compatibility what can work:

super(type(self), self).…

-> https://rhettinger.wordpress.com/2011/05/26/super-considered-super/#comment-32

This comment has been minimized.

Copy link
@jberry-suse

jberry-suse Feb 14, 2017

Author Contributor

Yeah, I looked it up a while back since it seemed rather ugly, but came to the same conclusion although type(self) is arguably more flexible.

@lnussel lnussel merged commit a5df36a into openSUSE:master Feb 14, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jberry-suse jberry-suse deleted the jberry-suse:ReviewBot-super branch Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.