From 651cc7cd071b1551729a421cb3c2bb234b8dba90 Mon Sep 17 00:00:00 2001 From: Alex Zorin Date: Mon, 22 Feb 2021 16:43:42 +1100 Subject: [PATCH] type annotations --- certbot/certbot/_internal/auth_handler.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/certbot/certbot/_internal/auth_handler.py b/certbot/certbot/_internal/auth_handler.py index 0da7eb0b5..9be04c82a 100644 --- a/certbot/certbot/_internal/auth_handler.py +++ b/certbot/certbot/_internal/auth_handler.py @@ -4,7 +4,6 @@ import logging import time import zope.component -from josepy.jwk import JWK # pylint: disable=unused-import from acme import challenges from acme import errors as acme_errors @@ -268,10 +267,9 @@ class AuthHandler(object): return achalls - def _report_failed_authzrs(self, failed_authzrs): - # type: (List[messages.AuthorizationResource]) -> None + def _report_failed_authzrs(self, failed_authzrs: List[messages.AuthorizationResource]) -> None: """Notifies the user about failed authorizations.""" - problems = {} # type: Dict[str, List[achallenges.AnnotatedChallenge]] + problems: Dict[str, List[achallenges.AnnotatedChallenge]] = {} failed_achalls = [challb_to_achall(challb, self.account.key, authzr.body.identifier.value) for authzr in failed_authzrs for challb in authzr.body.challenges if challb.error]