diff options
author | Brad Warren <bmw@users.noreply.github.com> | 2021-05-24 20:02:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-24 20:02:55 +0300 |
commit | 315ddb247f3dcf29eaa0bd357e3e88c9e6465eac (patch) | |
tree | 7097fecc23e6f479ffce86ea15e2239219670b7b /certbot-ci | |
parent | 2df279bc5bb30a38e4f9c1c5e44a7b327c56743c (diff) |
Upgrade pylint (#8855)
This is part of https://github.com/certbot/certbot/issues/8782. I took it on now because the currently pinned version of `pylint` doesn't work with newer versions of `poetry` which I wanted to upgrade as part of https://github.com/certbot/certbot/issues/8787.
To say a bit more about the specific changes in this PR:
* Newer versions of `pylint` complain if `Popen` isn't used as a context manager. Instead of making this change, I switched to using `subprocess.run` which is simpler and [recommended in the Python docs](https://docs.python.org/3/library/subprocess.html#using-the-subprocess-module). I also disabled this check in a few places where no longer using `Popen` would require significant refactoring.
* The deleted code in `certbot/certbot/_internal/renewal.py` is cruft since https://github.com/certbot/certbot/pull/8685.
* The unused argument to `enable_mod` in the Apache plugin is used in some over the override classes that subclass that class.
* unpin pylint and repin dependencies
* disable raise-missing-from
* disable wrong-input-order
* remove unused code
* misc lint fixes
* remove unused import
* various lint fixes
Diffstat (limited to 'certbot-ci')
3 files changed, 3 insertions, 0 deletions
diff --git a/certbot-ci/certbot_integration_tests/nginx_tests/context.py b/certbot-ci/certbot_integration_tests/nginx_tests/context.py index 3ee1766a1..f273ed9ff 100644 --- a/certbot-ci/certbot_integration_tests/nginx_tests/context.py +++ b/certbot-ci/certbot_integration_tests/nginx_tests/context.py @@ -51,6 +51,7 @@ class IntegrationTestsContext(certbot_context.IntegrationTestsContext): with open(self.nginx_config_path, 'w') as file: file.write(self.nginx_config) + # pylint: disable=consider-using-with process = subprocess.Popen(['nginx', '-c', self.nginx_config_path, '-g', 'daemon off;']) assert process.poll() is None diff --git a/certbot-ci/certbot_integration_tests/utils/acme_server.py b/certbot-ci/certbot_integration_tests/utils/acme_server.py index ceebbe7ed..9fd5fcb39 100755 --- a/certbot-ci/certbot_integration_tests/utils/acme_server.py +++ b/certbot-ci/certbot_integration_tests/utils/acme_server.py @@ -240,6 +240,7 @@ class ACMEServer: if not env: env = os.environ stdout = sys.stderr if force_stderr else self._stdout + # pylint: disable=consider-using-with process = subprocess.Popen( command, stdout=stdout, stderr=subprocess.STDOUT, cwd=cwd, env=env ) diff --git a/certbot-ci/certbot_integration_tests/utils/dns_server.py b/certbot-ci/certbot_integration_tests/utils/dns_server.py index 48f5a533e..d9007ef3a 100644 --- a/certbot-ci/certbot_integration_tests/utils/dns_server.py +++ b/certbot-ci/certbot_integration_tests/utils/dns_server.py @@ -83,6 +83,7 @@ class DNSServer: def _start_bind(self): """Launch the BIND9 server as a Docker container""" addr_str = "{}:{}".format(BIND_BIND_ADDRESS[0], BIND_BIND_ADDRESS[1]) + # pylint: disable=consider-using-with self.process = subprocess.Popen( [ "docker", |