diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-05-03 23:17:30 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-05-10 02:01:24 +0900 |
commit | 2ee634bfdada724bccd56b372670538f2f20b3bc (patch) | |
tree | 8e25b41d538d5114a11d24810ba8d23dd4a55826 /sphinx/domains/javascript.py | |
parent | b88187de34815977bb6f282f3cce7c2cd936e6a6 (diff) | |
download | sphinx-git-2ee634bfdada724bccd56b372670538f2f20b3bc.tar.gz |
refactor: Add Optional to type annotations
Diffstat (limited to 'sphinx/domains/javascript.py')
-rw-r--r-- | sphinx/domains/javascript.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/domains/javascript.py b/sphinx/domains/javascript.py index 92d0e1d61..8511a1d6a 100644 --- a/sphinx/domains/javascript.py +++ b/sphinx/domains/javascript.py @@ -8,7 +8,7 @@ :license: BSD, see LICENSE for details. """ -from typing import Any, Dict, Iterator, List, Tuple, cast +from typing import Any, Dict, Iterator, List, Optional, Tuple, cast from docutils import nodes from docutils.nodes import Element, Node @@ -413,7 +413,7 @@ class JavaScriptDomain(Domain): def resolve_xref(self, env: BuildEnvironment, fromdocname: str, builder: Builder, typ: str, target: str, node: pending_xref, contnode: Element - ) -> Element: + ) -> Optional[Element]: mod_name = node.get('js:module') prefix = node.get('js:object') searchorder = 1 if node.hasattr('refspecific') else 0 |