diff options
author | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2022-12-30 21:13:29 +0000 |
---|---|---|
committer | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2023-01-01 20:48:38 +0000 |
commit | 26f79b0d2dd88b353ac65623897bdfbe8bc07cab (patch) | |
tree | 0d2f0c752cf1f49a45cde1d7f414d75a6114f1ce /sphinx/util/jsdump.py | |
parent | f4c8a0a68e0013808d169357c9f77ebdf19d0f4e (diff) | |
download | sphinx-git-26f79b0d2dd88b353ac65623897bdfbe8bc07cab.tar.gz |
Use PEP 595 types
Diffstat (limited to 'sphinx/util/jsdump.py')
-rw-r--r-- | sphinx/util/jsdump.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/util/jsdump.py b/sphinx/util/jsdump.py index 0cd59c383..4b40c2bb9 100644 --- a/sphinx/util/jsdump.py +++ b/sphinx/util/jsdump.py @@ -7,7 +7,7 @@ from __future__ import annotations import re import warnings -from typing import IO, Any, Dict, List, Match, Union +from typing import IO, Any, Union from sphinx.deprecation import RemovedInSphinx70Warning @@ -35,7 +35,7 @@ ESCAPED = re.compile(r'\\u.{4}|\\.') def encode_string(s: str) -> str: - def replace(match: Match) -> str: + def replace(match: re.Match) -> str: s = match.group(0) try: return ESCAPE_DICT[s] @@ -111,7 +111,7 @@ def loads(x: str) -> Any: nothing = object() i = 0 n = len(x) - stack: List[Union[List, Dict]] = [] + stack: list[Union[list, dict]] = [] obj: Any = nothing key = False keys = [] |