cleanup: Use concise super() everywhere
This is a more concise version of the `super()` call that was introduced
in Python 3, which we can use now that recipe code doesn't need to run
under Python 2.
Change-Id: I0da7bdadf804e917ec6cc39164e5f54fde9e5040
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/88960
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Oliver Newman <olivernewman@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/recipe_modules/build/api.py b/recipe_modules/build/api.py
index ff3f89f..746c4ce 100644
--- a/recipe_modules/build/api.py
+++ b/recipe_modules/build/api.py
@@ -22,7 +22,7 @@
CAS_DIGEST_PROPERTY_NAME = 'cas_build_digest'
def __init__(self, *args, **kwargs):
- super(BuildApi, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self.dir = None
def initialize(self):
diff --git a/recipe_modules/checkout/api.py b/recipe_modules/checkout/api.py
index a50087a..6b07483 100644
--- a/recipe_modules/checkout/api.py
+++ b/recipe_modules/checkout/api.py
@@ -43,7 +43,7 @@
class Url(object):
def __init__(self, url, *args, **kwargs):
- super(Url, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self.url = url
self.https = None
diff --git a/recipe_modules/cipd_upload/api.py b/recipe_modules/cipd_upload/api.py
index 0106988..9430fd1 100644
--- a/recipe_modules/cipd_upload/api.py
+++ b/recipe_modules/cipd_upload/api.py
@@ -20,7 +20,7 @@
"""Utility functions for uploading a cipd package."""
def __init__(self, *args, **kwargs):
- super(CipdUploadApi, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self._platform = None
@property
diff --git a/recipe_modules/cq_deps/api.py b/recipe_modules/cq_deps/api.py
index 96c5038..34483d2 100644
--- a/recipe_modules/cq_deps/api.py
+++ b/recipe_modules/cq_deps/api.py
@@ -68,7 +68,7 @@
"""Find dependencies on pending CLs."""
def __init__(self, props, *args, **kwargs):
- super(CqDepsApi, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self._details = {}
self._enabled = not props.disabled
self._ignore_errors = props.ignore_errors
diff --git a/recipe_modules/environment/test_api.py b/recipe_modules/environment/test_api.py
index 7744425..0a76fbf 100644
--- a/recipe_modules/environment/test_api.py
+++ b/recipe_modules/environment/test_api.py
@@ -21,9 +21,6 @@
class EnvironmentTestApi(recipe_test_api.RecipeTestApi):
"""Test API for Enviroment."""
- def __init__(self, *args, **kwargs):
- super(EnvironmentTestApi, self).__init__(*args, **kwargs)
-
def properties(self, **kwargs):
props = {
'config_file': 'config_file.json',
diff --git a/recipe_modules/repo/api.py b/recipe_modules/repo/api.py
index c6fab56..5142aa3 100644
--- a/recipe_modules/repo/api.py
+++ b/recipe_modules/repo/api.py
@@ -40,7 +40,7 @@
ManifestDiff = ManifestDiff # pylint: disable=invalid-name
def __init__(self, *args, **kwargs):
- super(RepoApi, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self._repo = None
@property
diff --git a/recipe_modules/roll_util/api.py b/recipe_modules/roll_util/api.py
index 36b9af0..ea47c17 100644
--- a/recipe_modules/roll_util/api.py
+++ b/recipe_modules/roll_util/api.py
@@ -289,7 +289,7 @@
class RollUtilApi(recipe_api.RecipeApi):
def __init__(self, props, *args, **kwargs):
- super(RollUtilApi, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self.labels_to_set = collections.OrderedDict()
for label in sorted(props.labels_to_set, key=lambda x: x.label):
self.labels_to_set[str(label.label)] = label.value