From d3b74f41e0cbfd603d69f722c3cd99f973e05a2a Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Tue, 23 Mar 2021 21:33:47 +0100 Subject: [PATCH] Added missing from typing imports. (#8724) --- acme/tests/client_test.py | 1 + acme/tests/crypto_util_test.py | 1 + acme/tests/standalone_test.py | 1 + certbot-apache/tests/augeasnode_test.py | 2 ++ certbot-apache/tests/http_01_test.py | 1 + certbot-nginx/tests/parser_test.py | 1 + certbot/tests/display/completer_test.py | 2 ++ certbot/tests/error_handler_test.py | 1 + certbot/tests/log_test.py | 2 +- certbot/tests/main_test.py | 1 + certbot/tests/plugins/disco_test.py | 1 + certbot/tests/plugins/selection_test.py | 1 + certbot/tests/plugins/standalone_test.py | 1 + 13 files changed, 15 insertions(+), 1 deletion(-) diff --git a/acme/tests/client_test.py b/acme/tests/client_test.py index 14247335c..6addb09f3 100644 --- a/acme/tests/client_test.py +++ b/acme/tests/client_test.py @@ -5,6 +5,7 @@ import datetime import http.client as http_client import json import unittest +from typing import Dict from unittest import mock import josepy as jose diff --git a/acme/tests/crypto_util_test.py b/acme/tests/crypto_util_test.py index 8075b68ed..8c1f905d2 100644 --- a/acme/tests/crypto_util_test.py +++ b/acme/tests/crypto_util_test.py @@ -5,6 +5,7 @@ import socketserver import threading import time import unittest +from typing import List import josepy as jose import OpenSSL diff --git a/acme/tests/standalone_test.py b/acme/tests/standalone_test.py index a02d008a0..17d73dba8 100644 --- a/acme/tests/standalone_test.py +++ b/acme/tests/standalone_test.py @@ -4,6 +4,7 @@ import socket import socketserver import threading import unittest +from typing import Set from unittest import mock import josepy as jose diff --git a/certbot-apache/tests/augeasnode_test.py b/certbot-apache/tests/augeasnode_test.py index 83224fc98..42126a5a9 100644 --- a/certbot-apache/tests/augeasnode_test.py +++ b/certbot-apache/tests/augeasnode_test.py @@ -1,4 +1,6 @@ """Tests for AugeasParserNode classes""" +from typing import List + try: import mock except ImportError: # pragma: no cover diff --git a/certbot-apache/tests/http_01_test.py b/certbot-apache/tests/http_01_test.py index 06e19e445..9d66c3aa0 100644 --- a/certbot-apache/tests/http_01_test.py +++ b/certbot-apache/tests/http_01_test.py @@ -1,6 +1,7 @@ """Test for certbot_apache._internal.http_01.""" import unittest import errno +from typing import List try: import mock diff --git a/certbot-nginx/tests/parser_test.py b/certbot-nginx/tests/parser_test.py index 35173d094..b062c4196 100644 --- a/certbot-nginx/tests/parser_test.py +++ b/certbot-nginx/tests/parser_test.py @@ -3,6 +3,7 @@ import glob import re import shutil import unittest +from typing import List from certbot import errors from certbot.compat import os diff --git a/certbot/tests/display/completer_test.py b/certbot/tests/display/completer_test.py index 4b08fe3a1..86f939491 100644 --- a/certbot/tests/display/completer_test.py +++ b/certbot/tests/display/completer_test.py @@ -1,4 +1,6 @@ """Test certbot._internal.display.completer.""" +from typing import List + try: import readline # pylint: disable=import-error except ImportError: diff --git a/certbot/tests/error_handler_test.py b/certbot/tests/error_handler_test.py index 265a42023..521b6976b 100644 --- a/certbot/tests/error_handler_test.py +++ b/certbot/tests/error_handler_test.py @@ -3,6 +3,7 @@ import contextlib import signal import sys import unittest +from typing import Callable, Dict, Union try: import mock diff --git a/certbot/tests/log_test.py b/certbot/tests/log_test.py index 33d89c3ea..7b1aacd5c 100644 --- a/certbot/tests/log_test.py +++ b/certbot/tests/log_test.py @@ -5,7 +5,7 @@ import logging.handlers import sys import time import unittest - +from typing import Optional from acme import messages from certbot import errors diff --git a/certbot/tests/main_test.py b/certbot/tests/main_test.py index d4afed858..e093edd20 100644 --- a/certbot/tests/main_test.py +++ b/certbot/tests/main_test.py @@ -11,6 +11,7 @@ import sys import tempfile import traceback import unittest +from typing import List import josepy as jose import pytz diff --git a/certbot/tests/plugins/disco_test.py b/certbot/tests/plugins/disco_test.py index 64829c8cc..1d3fec722 100644 --- a/certbot/tests/plugins/disco_test.py +++ b/certbot/tests/plugins/disco_test.py @@ -2,6 +2,7 @@ import functools import string import unittest +from typing import List try: import mock diff --git a/certbot/tests/plugins/selection_test.py b/certbot/tests/plugins/selection_test.py index 027ebdc35..2dfd60a63 100644 --- a/certbot/tests/plugins/selection_test.py +++ b/certbot/tests/plugins/selection_test.py @@ -1,6 +1,7 @@ """Tests for letsencrypt.plugins.selection""" import sys import unittest +from typing import List try: import mock diff --git a/certbot/tests/plugins/standalone_test.py b/certbot/tests/plugins/standalone_test.py index 80347d35a..636b251de 100644 --- a/certbot/tests/plugins/standalone_test.py +++ b/certbot/tests/plugins/standalone_test.py @@ -3,6 +3,7 @@ import socket from socket import errno as socket_errors # type: ignore import unittest +from typing import Dict, Set, Tuple import josepy as jose try: