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:
authorAdrien Ferrand <adferrand@users.noreply.github.com>2021-04-06 01:04:21 +0300
committerGitHub <noreply@github.com>2021-04-06 01:04:21 +0300
commitc438a397a01659912060e2e4606cb9262f40d29d (patch)
tree54e87dd9969b3a559d0a6207e81f9846dccc173f /certbot-compatibility-test
parent0f9f902b6eb32bab609922cdcc78649d78c7b7c0 (diff)
Enable mypy strict mode (#8766)test-master
Built on top of #8748, this PR reenables mypy strict mode and adds the appropriate corrections to pass the types checks. * Upgrade mypy * First step for acme * Cast for the rescue * Fixing types for certbot * Fix typing for certbot-nginx * Finalize type fixes, configure no optional strict check for mypy in tox * Align requirements * Isort * Pylint * Protocol for python 3.6 * Use Python 3.9 for mypy, make code compatible with Python 3.8< * Pylint and mypy * Pragma no cover * Pythonic NotImplemented constant * More type definitions * Add comments * Simplify typing logic * Use vararg tuple * Relax constraints on mypy * Add more type * Do not silence error if target is not defined * Conditionally import Protocol for type checking only * Clean up imports * Add comments * Align python version linting with mypy and coverage * Just ignore types in an unused module * Add comments * Fix lint * Work in progress * Finish type control * Isort * Fix pylint * Fix imports * Fix cli subparser * Some fixes * Coverage * Remove --no-strict-optional (obviously...) * Update certbot-apache/certbot_apache/_internal/configurator.py Co-authored-by: Brad Warren <bmw@users.noreply.github.com> * Update certbot/certbot/_internal/display/completer.py Co-authored-by: Brad Warren <bmw@users.noreply.github.com> * Cleanup dns_google * Improve lock controls and fix subparser * Use the expected interfaces * Fix code Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
Diffstat (limited to 'certbot-compatibility-test')
-rw-r--r--certbot-compatibility-test/certbot_compatibility_test/configurators/common.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/certbot-compatibility-test/certbot_compatibility_test/configurators/common.py b/certbot-compatibility-test/certbot_compatibility_test/configurators/common.py
index bf768f8f8..bf26291ea 100644
--- a/certbot-compatibility-test/certbot_compatibility_test/configurators/common.py
+++ b/certbot-compatibility-test/certbot_compatibility_test/configurators/common.py
@@ -33,7 +33,9 @@ class Proxy:
self.args = args
self.http_port = 80
self.https_port = 443
- self._configurator = self._all_names = self._test_names = None
+ self._configurator = None
+ self._all_names = None
+ self._test_names = None
def __getattr__(self, name):
"""Wraps the configurator methods"""
@@ -93,5 +95,7 @@ class Proxy:
"""Installs cert"""
cert_path, key_path, chain_path = self.copy_certs_and_keys(
cert_path, key_path, chain_path)
+ if not self._configurator:
+ raise ValueError("Configurator plugin is not set.")
self._configurator.deploy_cert(
domain, cert_path, key_path, chain_path, fullchain_path)