Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Warren <bmw@users.noreply.github.com>2021-04-08 23:04:51 +0300
committerGitHub <noreply@github.com>2021-04-08 23:04:51 +0300
commit7f9857a81b7064d767f694e033b29dc4bb942406 (patch)
treebfbc0d7cbd1d8e40d2b540ba7a43d0e07da26e27 /certbot-apache
parent459a254aea3a9a5a6ac9f069ba446d93ce307a5c (diff)
Use Python 3 style super (#8777)
This is one of the things that newer versions of `pylint` complains about. * git grep -l super\( | xargs sed -i 's/super([^)]*)/super()/g' * fix spacing
Diffstat (limited to 'certbot-apache')
-rw-r--r--certbot-apache/certbot_apache/_internal/apacheparser.py8
-rw-r--r--certbot-apache/certbot_apache/_internal/augeasparser.py8
-rw-r--r--certbot-apache/certbot_apache/_internal/configurator.py6
-rw-r--r--certbot-apache/certbot_apache/_internal/http_01.py2
-rw-r--r--certbot-apache/certbot_apache/_internal/interfaces.py4
-rw-r--r--certbot-apache/certbot_apache/_internal/obj.py2
-rw-r--r--certbot-apache/certbot_apache/_internal/override_centos.py12
-rw-r--r--certbot-apache/certbot_apache/_internal/override_debian.py2
-rw-r--r--certbot-apache/certbot_apache/_internal/override_fedora.py10
-rw-r--r--certbot-apache/certbot_apache/_internal/override_gentoo.py4
-rw-r--r--certbot-apache/tests/augeasnode_test.py2
-rw-r--r--certbot-apache/tests/autohsts_test.py2
-rw-r--r--certbot-apache/tests/centos6_test.py6
-rw-r--r--certbot-apache/tests/centos_test.py12
-rw-r--r--certbot-apache/tests/complex_parsing_test.py2
-rw-r--r--certbot-apache/tests/configurator_reverter_test.py2
-rw-r--r--certbot-apache/tests/configurator_test.py16
-rw-r--r--certbot-apache/tests/debian_test.py2
-rw-r--r--certbot-apache/tests/fedora_test.py12
-rw-r--r--certbot-apache/tests/gentoo_test.py6
-rw-r--r--certbot-apache/tests/http_01_test.py2
-rw-r--r--certbot-apache/tests/parser_test.py4
-rw-r--r--certbot-apache/tests/parsernode_configurator_test.py2
-rw-r--r--certbot-apache/tests/parsernode_test.py6
-rw-r--r--certbot-apache/tests/util.py2
25 files changed, 68 insertions, 68 deletions
diff --git a/certbot-apache/certbot_apache/_internal/apacheparser.py b/certbot-apache/certbot_apache/_internal/apacheparser.py
index adfbc4442..d3bd1a4bf 100644
--- a/certbot-apache/certbot_apache/_internal/apacheparser.py
+++ b/certbot-apache/certbot_apache/_internal/apacheparser.py
@@ -15,7 +15,7 @@ class ApacheParserNode(interfaces.ParserNode):
def __init__(self, **kwargs):
ancestor, dirty, filepath, metadata = util.parsernode_kwargs(kwargs) # pylint: disable=unused-variable
- super(ApacheParserNode, self).__init__(**kwargs)
+ super().__init__(**kwargs)
self.ancestor = ancestor
self.filepath = filepath
self.dirty = dirty
@@ -39,7 +39,7 @@ class ApacheCommentNode(ApacheParserNode):
def __init__(self, **kwargs):
comment, kwargs = util.commentnode_kwargs(kwargs) # pylint: disable=unused-variable
- super(ApacheCommentNode, self).__init__(**kwargs)
+ super().__init__(**kwargs)
self.comment = comment
def __eq__(self, other): # pragma: no cover
@@ -57,7 +57,7 @@ class ApacheDirectiveNode(ApacheParserNode):
def __init__(self, **kwargs):
name, parameters, enabled, kwargs = util.directivenode_kwargs(kwargs)
- super(ApacheDirectiveNode, self).__init__(**kwargs)
+ super().__init__(**kwargs)
self.name = name
self.parameters = parameters
self.enabled = enabled
@@ -83,7 +83,7 @@ class ApacheBlockNode(ApacheDirectiveNode):
""" apacheconfig implementation of BlockNode interface """
def __init__(self, **kwargs):
- super(ApacheBlockNode, self).__init__(**kwargs)
+ super().__init__(**kwargs)
self.children: Tuple[ApacheParserNode, ...] = ()
def __eq__(self, other): # pragma: no cover
diff --git a/certbot-apache/certbot_apache/_internal/augeasparser.py b/certbot-apache/certbot_apache/_internal/augeasparser.py
index 4549e935a..896e17cf8 100644
--- a/certbot-apache/certbot_apache/_internal/augeasparser.py
+++ b/certbot-apache/certbot_apache/_internal/augeasparser.py
@@ -80,7 +80,7 @@ class AugeasParserNode(interfaces.ParserNode):
def __init__(self, **kwargs):
ancestor, dirty, filepath, metadata = util.parsernode_kwargs(kwargs) # pylint: disable=unused-variable
- super(AugeasParserNode, self).__init__(**kwargs)
+ super().__init__(**kwargs)
self.ancestor = ancestor
self.filepath = filepath
self.dirty = dirty
@@ -169,7 +169,7 @@ class AugeasCommentNode(AugeasParserNode):
def __init__(self, **kwargs):
comment, kwargs = util.commentnode_kwargs(kwargs) # pylint: disable=unused-variable
- super(AugeasCommentNode, self).__init__(**kwargs)
+ super().__init__(**kwargs)
# self.comment = comment
self.comment = comment
@@ -188,7 +188,7 @@ class AugeasDirectiveNode(AugeasParserNode):
def __init__(self, **kwargs):
name, parameters, enabled, kwargs = util.directivenode_kwargs(kwargs)
- super(AugeasDirectiveNode, self).__init__(**kwargs)
+ super().__init__(**kwargs)
self.name = name
self.enabled = enabled
if parameters:
@@ -245,7 +245,7 @@ class AugeasBlockNode(AugeasDirectiveNode):
""" Augeas implementation of BlockNode interface """
def __init__(self, **kwargs):
- super(AugeasBlockNode, self).__init__(**kwargs)
+ super().__init__(**kwargs)
self.children = ()
def __eq__(self, other):
diff --git a/certbot-apache/certbot_apache/_internal/configurator.py b/certbot-apache/certbot_apache/_internal/configurator.py
index 28f73b32d..5ef9083e6 100644
--- a/certbot-apache/certbot_apache/_internal/configurator.py
+++ b/certbot-apache/certbot_apache/_internal/configurator.py
@@ -214,7 +214,7 @@ class ApacheConfigurator(common.Installer):
version = kwargs.pop("version", None)
use_parsernode = kwargs.pop("use_parsernode", False)
openssl_version = kwargs.pop("openssl_version", None)
- super(ApacheConfigurator, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
# Add name_server association dict
self.assoc: Dict[str, obj.VirtualHost] = {}
@@ -410,7 +410,7 @@ class ApacheConfigurator(common.Installer):
:raises .errors.PluginError: If unable to recover the configuration
"""
- super(ApacheConfigurator, self).recovery_routine()
+ super().recovery_routine()
# Reload configuration after these changes take effect if needed
# ie. ApacheParser has been initialized.
if hasattr(self, "parser"):
@@ -435,7 +435,7 @@ class ApacheConfigurator(common.Installer):
the function is unable to correctly revert the configuration
"""
- super(ApacheConfigurator, self).rollback_checkpoints(rollback)
+ super().rollback_checkpoints(rollback)
self.parser.aug.load()
def _verify_exe_availability(self, exe):
diff --git a/certbot-apache/certbot_apache/_internal/http_01.py b/certbot-apache/certbot_apache/_internal/http_01.py
index 66d888e97..83a1a8e08 100644
--- a/certbot-apache/certbot_apache/_internal/http_01.py
+++ b/certbot-apache/certbot_apache/_internal/http_01.py
@@ -47,7 +47,7 @@ class ApacheHttp01(common.ChallengePerformer):
"""
def __init__(self, *args, **kwargs):
- super(ApacheHttp01, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self.challenge_conf_pre = os.path.join(
self.configurator.conf("challenge-location"),
"le_http_01_challenge_pre.conf")
diff --git a/certbot-apache/certbot_apache/_internal/interfaces.py b/certbot-apache/certbot_apache/_internal/interfaces.py
index 38c21b785..106e2778a 100644
--- a/certbot-apache/certbot_apache/_internal/interfaces.py
+++ b/certbot-apache/certbot_apache/_internal/interfaces.py
@@ -238,7 +238,7 @@ class CommentNode(ParserNode, metaclass=abc.ABCMeta):
created or changed after the last save. Default: False.
:type dirty: bool
"""
- super(CommentNode, self).__init__(ancestor=kwargs['ancestor'],
+ super().__init__(ancestor=kwargs['ancestor'],
dirty=kwargs.get('dirty', False),
filepath=kwargs['filepath'],
metadata=kwargs.get('metadata', {})) # pragma: no cover
@@ -302,7 +302,7 @@ class DirectiveNode(ParserNode, metaclass=abc.ABCMeta):
:type enabled: bool
"""
- super(DirectiveNode, self).__init__(ancestor=kwargs['ancestor'],
+ super().__init__(ancestor=kwargs['ancestor'],
dirty=kwargs.get('dirty', False),
filepath=kwargs['filepath'],
metadata=kwargs.get('metadata', {})) # pragma: no cover
diff --git a/certbot-apache/certbot_apache/_internal/obj.py b/certbot-apache/certbot_apache/_internal/obj.py
index 21fd042f6..9001a860d 100644
--- a/certbot-apache/certbot_apache/_internal/obj.py
+++ b/certbot-apache/certbot_apache/_internal/obj.py
@@ -26,7 +26,7 @@ class Addr(common.Addr):
def __hash__(self): # pylint: disable=useless-super-delegation
# Python 3 requires explicit overridden for __hash__ if __eq__ or
# __cmp__ is overridden. See https://bugs.python.org/issue2235
- return super(Addr, self).__hash__()
+ return super().__hash__()
def _addr_less_specific(self, addr):
"""Returns if addr.get_addr() is more specific than self.get_addr()."""
diff --git a/certbot-apache/certbot_apache/_internal/override_centos.py b/certbot-apache/certbot_apache/_internal/override_centos.py
index bd9a47b52..98dc80e0b 100644
--- a/certbot-apache/certbot_apache/_internal/override_centos.py
+++ b/certbot-apache/certbot_apache/_internal/override_centos.py
@@ -51,7 +51,7 @@ class CentOSConfigurator(configurator.ApacheConfigurator):
fedora = os_info[0].lower() == "fedora"
try:
- super(CentOSConfigurator, self).config_test()
+ super().config_test()
except errors.MisconfigurationError:
if fedora:
self._try_restart_fedora()
@@ -69,14 +69,14 @@ class CentOSConfigurator(configurator.ApacheConfigurator):
raise errors.MisconfigurationError(str(err))
# Finish with actual config check to see if systemctl restart helped
- super(CentOSConfigurator, self).config_test()
+ super().config_test()
def _prepare_options(self):
"""
Override the options dictionary initialization in order to support
alternative restart cmd used in CentOS.
"""
- super(CentOSConfigurator, self)._prepare_options()
+ super()._prepare_options()
cast(List[str], self.options["restart_cmd_alt"])[0] = self.option("ctl")
def get_parser(self):
@@ -91,7 +91,7 @@ class CentOSConfigurator(configurator.ApacheConfigurator):
has "LoadModule ssl_module..." before parsing the VirtualHost configuration
that was created by Certbot
"""
- super(CentOSConfigurator, self)._deploy_cert(*args, **kwargs)
+ super()._deploy_cert(*args, **kwargs)
if self.version < (2, 4, 0):
self._deploy_loadmodule_ssl_if_needed()
@@ -169,12 +169,12 @@ class CentOSParser(parser.ApacheParser):
def __init__(self, *args, **kwargs):
# CentOS specific configuration file for Apache
self.sysconfig_filep = "/etc/sysconfig/httpd"
- super(CentOSParser, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
def update_runtime_variables(self):
""" Override for update_runtime_variables for custom parsing """
# Opportunistic, works if SELinux not enforced
- super(CentOSParser, self).update_runtime_variables()
+ super().update_runtime_variables()
self.parse_sysconfig_var()
def parse_sysconfig_var(self):
diff --git a/certbot-apache/certbot_apache/_internal/override_debian.py b/certbot-apache/certbot_apache/_internal/override_debian.py
index 9f938046b..c5f3b6e1a 100644
--- a/certbot-apache/certbot_apache/_internal/override_debian.py
+++ b/certbot-apache/certbot_apache/_internal/override_debian.py
@@ -58,7 +58,7 @@ class DebianConfigurator(configurator.ApacheConfigurator):
if not os.path.isdir(os.path.dirname(enabled_path)):
# For some reason, sites-enabled / sites-available do not exist
# Call the parent method
- return super(DebianConfigurator, self).enable_site(vhost)
+ return super().enable_site(vhost)
self.reverter.register_file_creation(False, enabled_path)
try:
os.symlink(vhost.filep, enabled_path)
diff --git a/certbot-apache/certbot_apache/_internal/override_fedora.py b/certbot-apache/certbot_apache/_internal/override_fedora.py
index 0dc3df66b..0f7970460 100644
--- a/certbot-apache/certbot_apache/_internal/override_fedora.py
+++ b/certbot-apache/certbot_apache/_internal/override_fedora.py
@@ -43,7 +43,7 @@ class FedoraConfigurator(configurator.ApacheConfigurator):
during the first (re)start of httpd.
"""
try:
- super(FedoraConfigurator, self).config_test()
+ super().config_test()
except errors.MisconfigurationError:
self._try_restart_fedora()
@@ -63,7 +63,7 @@ class FedoraConfigurator(configurator.ApacheConfigurator):
raise errors.MisconfigurationError(str(err))
# Finish with actual config check to see if systemctl restart helped
- super(FedoraConfigurator, self).config_test()
+ super().config_test()
def _prepare_options(self):
"""
@@ -71,7 +71,7 @@ class FedoraConfigurator(configurator.ApacheConfigurator):
instead of httpd and so take advantages of this new bash script in newer versions
of Fedora to restart httpd.
"""
- super(FedoraConfigurator, self)._prepare_options()
+ super()._prepare_options()
cast(List[str], self.options["restart_cmd"])[0] = 'apachectl'
cast(List[str], self.options["restart_cmd_alt"])[0] = 'apachectl'
cast(List[str], self.options["conftest_cmd"])[0] = 'apachectl'
@@ -82,12 +82,12 @@ class FedoraParser(parser.ApacheParser):
def __init__(self, *args, **kwargs):
# Fedora 29+ specific configuration file for Apache
self.sysconfig_filep = "/etc/sysconfig/httpd"
- super(FedoraParser, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
def update_runtime_variables(self):
""" Override for update_runtime_variables for custom parsing """
# Opportunistic, works if SELinux not enforced
- super(FedoraParser, self).update_runtime_variables()
+ super().update_runtime_variables()
self._parse_sysconfig_var()
def _parse_sysconfig_var(self):
diff --git a/certbot-apache/certbot_apache/_internal/override_gentoo.py b/certbot-apache/certbot_apache/_internal/override_gentoo.py
index 773fdd568..484e15532 100644
--- a/certbot-apache/certbot_apache/_internal/override_gentoo.py
+++ b/certbot-apache/certbot_apache/_internal/override_gentoo.py
@@ -38,7 +38,7 @@ class GentooConfigurator(configurator.ApacheConfigurator):
Override the options dictionary initialization in order to support
alternative restart cmd used in Gentoo.
"""
- super(GentooConfigurator, self)._prepare_options()
+ super()._prepare_options()
cast(List[str], self.options["restart_cmd_alt"])[0] = self.option("ctl")
def get_parser(self):
@@ -53,7 +53,7 @@ class GentooParser(parser.ApacheParser):
def __init__(self, *args, **kwargs):
# Gentoo specific configuration file for Apache2
self.apacheconfig_filep = "/etc/conf.d/apache2"
- super(GentooParser, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
def update_runtime_variables(self):
""" Override for update_runtime_variables for custom parsing """
diff --git a/certbot-apache/tests/augeasnode_test.py b/certbot-apache/tests/augeasnode_test.py
index 42126a5a9..85a17ab31 100644
--- a/certbot-apache/tests/augeasnode_test.py
+++ b/certbot-apache/tests/augeasnode_test.py
@@ -29,7 +29,7 @@ class AugeasParserNodeTest(util.ApacheTest): # pylint: disable=too-many-public-
"""Test AugeasParserNode using available test configurations"""
def setUp(self): # pylint: disable=arguments-differ
- super(AugeasParserNodeTest, self).setUp()
+ super().setUp()
with mock.patch("certbot_apache._internal.configurator.ApacheConfigurator.get_parsernode_root") as mock_parsernode:
mock_parsernode.side_effect = _get_augeasnode_mock(
diff --git a/certbot-apache/tests/autohsts_test.py b/certbot-apache/tests/autohsts_test.py
index db1c46b52..8c8ba4873 100644
--- a/certbot-apache/tests/autohsts_test.py
+++ b/certbot-apache/tests/autohsts_test.py
@@ -18,7 +18,7 @@ class AutoHSTSTest(util.ApacheTest):
# pylint: disable=protected-access
def setUp(self): # pylint: disable=arguments-differ
- super(AutoHSTSTest, self).setUp()
+ super().setUp()
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir, self.work_dir)
diff --git a/certbot-apache/tests/centos6_test.py b/certbot-apache/tests/centos6_test.py
index 27b4f8e80..bfbe22ad0 100644
--- a/certbot-apache/tests/centos6_test.py
+++ b/certbot-apache/tests/centos6_test.py
@@ -36,9 +36,9 @@ class CentOS6Tests(util.ApacheTest):
test_dir = "centos6_apache/apache"
config_root = "centos6_apache/apache/httpd"
vhost_root = "centos6_apache/apache/httpd/conf.d"
- super(CentOS6Tests, self).setUp(test_dir=test_dir,
- config_root=config_root,
- vhost_root=vhost_root)
+ super().setUp(test_dir=test_dir,
+ config_root=config_root,
+ vhost_root=vhost_root)
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir, self.work_dir,
diff --git a/certbot-apache/tests/centos_test.py b/certbot-apache/tests/centos_test.py
index b7e9c1cb6..a92c37979 100644
--- a/certbot-apache/tests/centos_test.py
+++ b/certbot-apache/tests/centos_test.py
@@ -41,9 +41,9 @@ class FedoraRestartTest(util.ApacheTest):
test_dir = "centos7_apache/apache"
config_root = "centos7_apache/apache/httpd"
vhost_root = "centos7_apache/apache/httpd/conf.d"
- super(FedoraRestartTest, self).setUp(test_dir=test_dir,
- config_root=config_root,
- vhost_root=vhost_root)
+ super().setUp(test_dir=test_dir,
+ config_root=config_root,
+ vhost_root=vhost_root)
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir, self.work_dir,
os_info="fedora_old")
@@ -96,9 +96,9 @@ class MultipleVhostsTestCentOS(util.ApacheTest):
test_dir = "centos7_apache/apache"
config_root = "centos7_apache/apache/httpd"
vhost_root = "centos7_apache/apache/httpd/conf.d"
- super(MultipleVhostsTestCentOS, self).setUp(test_dir=test_dir,
- config_root=config_root,
- vhost_root=vhost_root)
+ super().setUp(test_dir=test_dir,
+ config_root=config_root,
+ vhost_root=vhost_root)
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir, self.work_dir,
diff --git a/certbot-apache/tests/complex_parsing_test.py b/certbot-apache/tests/complex_parsing_test.py
index 8b795b0b6..e36bd85d1 100644
--- a/certbot-apache/tests/complex_parsing_test.py
+++ b/certbot-apache/tests/complex_parsing_test.py
@@ -11,7 +11,7 @@ class ComplexParserTest(util.ParserTest):
"""Apache Parser Test."""
def setUp(self): # pylint: disable=arguments-differ
- super(ComplexParserTest, self).setUp(
+ super().setUp(
"complex_parsing", "complex_parsing")
self.setup_variables()
diff --git a/certbot-apache/tests/configurator_reverter_test.py b/certbot-apache/tests/configurator_reverter_test.py
index 8596195d8..d8f5ddd05 100644
--- a/certbot-apache/tests/configurator_reverter_test.py
+++ b/certbot-apache/tests/configurator_reverter_test.py
@@ -16,7 +16,7 @@ class ConfiguratorReverterTest(util.ApacheTest):
def setUp(self): # pylint: disable=arguments-differ
- super(ConfiguratorReverterTest, self).setUp()
+ super().setUp()
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir, self.work_dir)
diff --git a/certbot-apache/tests/configurator_test.py b/certbot-apache/tests/configurator_test.py
index 302bf0023..ad1f5f04d 100644
--- a/certbot-apache/tests/configurator_test.py
+++ b/certbot-apache/tests/configurator_test.py
@@ -30,7 +30,7 @@ class MultipleVhostsTest(util.ApacheTest):
"""Test two standard well-configured HTTP vhosts."""
def setUp(self): # pylint: disable=arguments-differ
- super(MultipleVhostsTest, self).setUp()
+ super().setUp()
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir, self.work_dir)
@@ -1477,9 +1477,9 @@ class AugeasVhostsTest(util.ApacheTest):
td = "debian_apache_2_4/augeas_vhosts"
cr = "debian_apache_2_4/augeas_vhosts/apache2"
vr = "debian_apache_2_4/augeas_vhosts/apache2/sites-available"
- super(AugeasVhostsTest, self).setUp(test_dir=td,
- config_root=cr,
- vhost_root=vr)
+ super().setUp(test_dir=td,
+ config_root=cr,
+ vhost_root=vr)
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir,
@@ -1556,9 +1556,9 @@ class MultiVhostsTest(util.ApacheTest):
td = "debian_apache_2_4/multi_vhosts"
cr = "debian_apache_2_4/multi_vhosts/apache2"
vr = "debian_apache_2_4/multi_vhosts/apache2/sites-available"
- super(MultiVhostsTest, self).setUp(test_dir=td,
- config_root=cr,
- vhost_root=vr)
+ super().setUp(test_dir=td,
+ config_root=cr,
+ vhost_root=vr)
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path,
@@ -1661,7 +1661,7 @@ class InstallSslOptionsConfTest(util.ApacheTest):
"""Test that the options-ssl-nginx.conf file is installed and updated properly."""
def setUp(self): # pylint: disable=arguments-differ
- super(InstallSslOptionsConfTest, self).setUp()
+ super().setUp()
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir, self.work_dir)
diff --git a/certbot-apache/tests/debian_test.py b/certbot-apache/tests/debian_test.py
index 192e3cba5..c72b8b6ae 100644
--- a/certbot-apache/tests/debian_test.py
+++ b/certbot-apache/tests/debian_test.py
@@ -20,7 +20,7 @@ class MultipleVhostsTestDebian(util.ApacheTest):
_multiprocess_can_split_ = True
def setUp(self): # pylint: disable=arguments-differ
- super(MultipleVhostsTestDebian, self).setUp()
+ super().setUp()
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir, self.work_dir,
os_info="debian")
diff --git a/certbot-apache/tests/fedora_test.py b/certbot-apache/tests/fedora_test.py
index 50831802b..d48559cee 100644
--- a/certbot-apache/tests/fedora_test.py
+++ b/certbot-apache/tests/fedora_test.py
@@ -46,9 +46,9 @@ class FedoraRestartTest(util.ApacheTest):
test_dir = "centos7_apache/apache"
config_root = "centos7_apache/apache/httpd"
vhost_root = "centos7_apache/apache/httpd/conf.d"
- super(FedoraRestartTest, self).setUp(test_dir=test_dir,
- config_root=config_root,
- vhost_root=vhost_root)
+ super().setUp(test_dir=test_dir,
+ config_root=config_root,
+ vhost_root=vhost_root)
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir, self.work_dir,
os_info="fedora")
@@ -90,9 +90,9 @@ class MultipleVhostsTestFedora(util.ApacheTest):
test_dir = "centos7_apache/apache"
config_root = "centos7_apache/apache/httpd"
vhost_root = "centos7_apache/apache/httpd/conf.d"
- super(MultipleVhostsTestFedora, self).setUp(test_dir=test_dir,
- config_root=config_root,
- vhost_root=vhost_root)
+ super().setUp(test_dir=test_dir,
+ config_root=config_root,
+ vhost_root=vhost_root)
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir, self.work_dir,
diff --git a/certbot-apache/tests/gentoo_test.py b/certbot-apache/tests/gentoo_test.py
index 64f7d1062..cf39ff5cb 100644
--- a/certbot-apache/tests/gentoo_test.py
+++ b/certbot-apache/tests/gentoo_test.py
@@ -50,9 +50,9 @@ class MultipleVhostsTestGentoo(util.ApacheTest):
test_dir = "gentoo_apache/apache"
config_root = "gentoo_apache/apache/apache2"
vhost_root = "gentoo_apache/apache/apache2/vhosts.d"
- super(MultipleVhostsTestGentoo, self).setUp(test_dir=test_dir,
- config_root=config_root,
- vhost_root=vhost_root)
+ super().setUp(test_dir=test_dir,
+ config_root=config_root,
+ vhost_root=vhost_root)
# pylint: disable=line-too-long
with mock.patch("certbot_apache._internal.override_gentoo.GentooParser.update_runtime_variables"):
diff --git a/certbot-apache/tests/http_01_test.py b/certbot-apache/tests/http_01_test.py
index 9d66c3aa0..71f2db500 100644
--- a/certbot-apache/tests/http_01_test.py
+++ b/certbot-apache/tests/http_01_test.py
@@ -24,7 +24,7 @@ class ApacheHttp01Test(util.ApacheTest):
"""Test for certbot_apache._internal.http_01.ApacheHttp01."""
def setUp(self, *args, **kwargs): # pylint: disable=arguments-differ
- super(ApacheHttp01Test, self).setUp(*args, **kwargs)
+ super().setUp(*args, **kwargs)
self.account_key = self.rsa512jwk
self.achalls: List[achallenges.KeyAuthorizationAnnotatedChallenge] = []
diff --git a/certbot-apache/tests/parser_test.py b/certbot-apache/tests/parser_test.py
index 2eff9a9dd..37d4eb782 100644
--- a/certbot-apache/tests/parser_test.py
+++ b/certbot-apache/tests/parser_test.py
@@ -16,7 +16,7 @@ class BasicParserTest(util.ParserTest):
"""Apache Parser Test."""
def setUp(self): # pylint: disable=arguments-differ
- super(BasicParserTest, self).setUp()
+ super().setUp()
def tearDown(self):
shutil.rmtree(self.temp_dir)
@@ -332,7 +332,7 @@ class BasicParserTest(util.ParserTest):
class ParserInitTest(util.ApacheTest):
def setUp(self): # pylint: disable=arguments-differ
- super(ParserInitTest, self).setUp()
+ super().setUp()
def tearDown(self):
shutil.rmtree(self.temp_dir)
diff --git a/certbot-apache/tests/parsernode_configurator_test.py b/certbot-apache/tests/parsernode_configurator_test.py
index 7fbec2540..411871a43 100644
--- a/certbot-apache/tests/parsernode_configurator_test.py
+++ b/certbot-apache/tests/parsernode_configurator_test.py
@@ -20,7 +20,7 @@ class ConfiguratorParserNodeTest(util.ApacheTest): # pylint: disable=too-many-p
"""Test AugeasParserNode using available test configurations"""
def setUp(self): # pylint: disable=arguments-differ
- super(ConfiguratorParserNodeTest, self).setUp()
+ super().setUp()
self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir,
diff --git a/certbot-apache/tests/parsernode_test.py b/certbot-apache/tests/parsernode_test.py
index a86952f53..4ea5f8415 100644
--- a/certbot-apache/tests/parsernode_test.py
+++ b/certbot-apache/tests/parsernode_test.py
@@ -18,7 +18,7 @@ class DummyParserNode(interfaces.ParserNode):
self.dirty = dirty
self.filepath = filepath
self.metadata = metadata
- super(DummyParserNode, self).__init__(**kwargs)
+ super().__init__(**kwargs)
def save(self, msg): # pragma: no cover
"""Save"""
@@ -38,7 +38,7 @@ class DummyCommentNode(DummyParserNode):
"""
comment, kwargs = util.commentnode_kwargs(kwargs)
self.comment = comment
- super(DummyCommentNode, self).__init__(**kwargs)
+ super().__init__(**kwargs)
class DummyDirectiveNode(DummyParserNode):
@@ -54,7 +54,7 @@ class DummyDirectiveNode(DummyParserNode):
self.parameters = parameters
self.enabled = enabled
- super(DummyDirectiveNode, self).__init__(**kwargs)
+ super().__init__(**kwargs)
def set_parameters(self, parameters): # pragma: no cover
"""Set parameters"""
diff --git a/certbot-apache/tests/util.py b/certbot-apache/tests/util.py
index 18c7e5aca..bd522d736 100644
--- a/certbot-apache/tests/util.py
+++ b/certbot-apache/tests/util.py
@@ -67,7 +67,7 @@ class ParserTest(ApacheTest):
def setUp(self, test_dir="debian_apache_2_4/multiple_vhosts",
config_root="debian_apache_2_4/multiple_vhosts/apache2",
vhost_root="debian_apache_2_4/multiple_vhosts/apache2/sites-available"):
- super(ParserTest, self).setUp(test_dir, config_root, vhost_root)
+ super().setUp(test_dir, config_root, vhost_root)
zope.component.provideUtility(display_util.FileDisplay(sys.stdout,
False))