From 3d19e6e7c94acdc7568ea10b99b625f9643c8840 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Mon, 11 Sep 2023 23:02:42 +0200 Subject: [PATCH] Fix mypy --- certbot/certbot/plugins/dns_common_lexicon.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/certbot/certbot/plugins/dns_common_lexicon.py b/certbot/certbot/plugins/dns_common_lexicon.py index 32dc2a1cf..6cfc39b9c 100644 --- a/certbot/certbot/plugins/dns_common_lexicon.py +++ b/certbot/certbot/plugins/dns_common_lexicon.py @@ -277,23 +277,23 @@ class _DeprecationModule: Internal class delegating to a module, and displaying warnings when attributes related to deprecated attributes in the current module. """ - def __init__(self, module): + def __init__(self, module: ModuleType): self.__dict__['_module'] = module - def __getattr__(self, attr): + def __getattr__(self, attr: str) -> Any: if attr in ('LexiconClient', 'build_lexicon_config'): warnings.warn(f'{attr} attribute in {__name__} module is deprecated ' 'and will be removed soon.', DeprecationWarning, stacklevel=2) return getattr(self._module, attr) - def __setattr__(self, attr, value): # pragma: no cover + def __setattr__(self, attr: str, value: Any) -> None: # pragma: no cover setattr(self._module, attr, value) - def __delattr__(self, attr): # pragma: no cover + def __delattr__(self, attr: str) -> Any: # pragma: no cover delattr(self._module, attr) - def __dir__(self): # pragma: no cover + def __dir__(self) -> List[str]: # pragma: no cover return ['_module'] + dir(self._module)