Page MenuHomePhabricator

test: use zero-argument super() shortcut (Python 3.0+)
ClosedPublic

Authored by PiRK on Jan 20 2021, 16:40.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC438dca9e5035: test: use zero-argument super() shortcut (Python 3.0+)
Summary

as defined in PEP 3135:

"The new syntax:

super()

is equivalent to:

super(__class__, <firstarg>)

where class is the class that the method was defined in, and <firstarg> is
the first parameter of the method (normally self for instance methods, and cls
for class methods)."

This is a backport of Core PR18585

Test Plan

grep "super(.*, self)" test/functional/*
ninja check-functional-extended

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Jan 20 2021, 16:40

revert change in feature_block

I'm not sure why the super call has the parent class as first argument, in doubt it's better to leave it as it is.
The method just below use a new style super() call so wee can assume that super(CBlock, self) is intentional.

This revision is now accepted and ready to land.Jan 20 2021, 18:19