From 1b0d4672a41e91289292dd5d05b7fe09a8feec17 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 4 Apr 2021 14:37:15 +0900 Subject: refactor: use raw Type for type annotations --- sphinx/deprecation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sphinx/deprecation.py') diff --git a/sphinx/deprecation.py b/sphinx/deprecation.py index aeefcc61f..6b0bdd158 100644 --- a/sphinx/deprecation.py +++ b/sphinx/deprecation.py @@ -30,7 +30,7 @@ RemovedInNextVersionWarning = RemovedInSphinx50Warning def deprecated_alias(modname: str, objects: Dict[str, object], - warning: "Type[Warning]", names: Dict[str, str] = {}) -> None: + warning: Type[Warning], names: Dict[str, str] = {}) -> None: module = import_module(modname) sys.modules[modname] = _ModuleWrapper( # type: ignore module, modname, objects, warning, names) @@ -39,7 +39,7 @@ def deprecated_alias(modname: str, objects: Dict[str, object], class _ModuleWrapper: def __init__(self, module: Any, modname: str, objects: Dict[str, object], - warning: "Type[Warning]", + warning: Type[Warning], names: Dict[str, str]) -> None: self._module = module self._modname = modname @@ -67,7 +67,7 @@ class _ModuleWrapper: class DeprecatedDict(dict): """A deprecated dict which warns on each access.""" - def __init__(self, data: Dict, message: str, warning: "Type[Warning]") -> None: + def __init__(self, data: Dict, message: str, warning: Type[Warning]) -> None: self.message = message self.warning = warning super().__init__(data) -- cgit v1.2.3