From b402734e5ae2b35c0e38381864a9b24c129b03bf Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 24 Dec 2020 12:34:55 +0200 Subject: utils: checkstyle.py: Drop arguments to super() when possible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The super() call is a shortcut syntax for super(__class__, ). Drop the arguments when they match the default. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Paul Elder --- utils/checkstyle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/checkstyle.py b/utils/checkstyle.py index 7225cac4..c04bf385 100755 --- a/utils/checkstyle.py +++ b/utils/checkstyle.py @@ -198,7 +198,7 @@ _style_checkers = [] class StyleCheckerRegistry(type): def __new__(cls, clsname, bases, attrs): - newclass = super(StyleCheckerRegistry, cls).__new__(cls, clsname, bases, attrs) + newclass = super().__new__(cls, clsname, bases, attrs) if clsname != 'StyleChecker': _style_checkers.append(newclass) return newclass @@ -387,7 +387,7 @@ _formatters = [] class FormatterRegistry(type): def __new__(cls, clsname, bases, attrs): - newclass = super(FormatterRegistry, cls).__new__(cls, clsname, bases, attrs) + newclass = super().__new__(cls, clsname, bases, attrs) if clsname != 'Formatter': _formatters.append(newclass) return newclass -- cgit v1.2.1