jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/631138 )
Change subject: [IMPR] shorten super() calls in utils.py ......................................................................
[IMPR] shorten super() calls in utils.py
Change-Id: I42ebe46312e8a623214eb27f56f5ab5a7ab5c057 --- M tests/utils.py 1 file changed, 7 insertions(+), 7 deletions(-)
Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/utils.py b/tests/utils.py index b8ab0a7..9db82d4 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -105,7 +105,7 @@ warning that matches the skip_list won't be adjusted. @type skip_list: list of object or (obj, str, int, int) """ - super(WarningSourceSkipContextManager, self).__init__(record=True) + super().__init__(record=True) self.skip_list = skip_list
@property @@ -180,7 +180,7 @@
log.append(warn_msg)
- log = super(WarningSourceSkipContextManager, self).__enter__() + log = super().__enter__() self._module.showwarning = detailed_show_warning return log
@@ -233,7 +233,7 @@
def __init__(self, *args, **kwargs): """Initializer.""" - super(DryParamInfo, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.modules = set() self.action_modules = set() self.query_modules = set() @@ -251,7 +251,7 @@ def __getitem__(self, name): """Return dry data or a dummy parameter block.""" try: - return super(DryParamInfo, self).__getitem__(name) + return super().__getitem__(name) except KeyError: return {'name': name, 'limit': None}
@@ -340,7 +340,7 @@
def __init__(self, code, fam, user): """Initializer.""" - super(DrySite, self).__init__(code, fam, user) + super().__init__(code, fam, user) self._userinfo = pywikibot.tools.EMPTY_DEFAULT self._paraminfo = DryParamInfo() self._siteinfo = DummySiteinfo({}) @@ -414,7 +414,7 @@ """Dummy class to use instead of L{pywikibot.site.DataSite}."""
def _build_namespaces(self): - namespaces = super(DryDataSite, self)._build_namespaces() + namespaces = super()._build_namespaces() namespaces[0].defaultcontentmodel = 'wikibase-item' namespaces[120] = Namespace(id=120, case='first-letter', @@ -526,7 +526,7 @@ @param data: The data returned for any request or fetch. @type data: callable or False (or other depending on request/fetch) """ - super(PatchedHttp, self).__init__() + super().__init__() self._module = module self.data = data
pywikibot-commits@lists.wikimedia.org