Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-04-04 08:37:15 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-04-04 08:47:43 +0300
commit1b0d4672a41e91289292dd5d05b7fe09a8feec17 (patch)
treef30edab2c63042c88ed1e1ca8fe9cd9be9d71db0 /sphinx/deprecation.py
parentf7a2e081c867e5fb125561f1a3ec26d851a0aeeb (diff)
refactor: use raw Type for type annotations
Diffstat (limited to 'sphinx/deprecation.py')
-rw-r--r--sphinx/deprecation.py6
1 files changed, 3 insertions, 3 deletions
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)