diff options
author | danieleades <33452915+danieleades@users.noreply.github.com> | 2023-01-02 18:32:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-02 18:32:44 +0000 |
commit | 94e6e3917fc41862d662fbed0155673781c426d3 (patch) | |
tree | f72459c865afd8dba661a4a21c9d482120e552a1 /sphinx/domains/javascript.py | |
parent | 256e52180759e7205178a8aa087ee1e362b7669d (diff) | |
download | sphinx-git-94e6e3917fc41862d662fbed0155673781c426d3.tar.gz |
De-glob mypy whitelist for 'sphinx.domains.*' (#11064)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Diffstat (limited to 'sphinx/domains/javascript.py')
-rw-r--r-- | sphinx/domains/javascript.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sphinx/domains/javascript.py b/sphinx/domains/javascript.py index 89f04d7ad..97640f74b 100644 --- a/sphinx/domains/javascript.py +++ b/sphinx/domains/javascript.py @@ -412,7 +412,7 @@ class JavaScriptDomain(Domain): if pkg_docname == docname: del self.modules[modname] - def merge_domaindata(self, docnames: list[str], otherdata: dict) -> None: + def merge_domaindata(self, docnames: list[str], otherdata: dict[str, Any]) -> None: # XXX check duplicates for fullname, (fn, node_id, objtype) in otherdata['objects'].items(): if fn in docnames: @@ -421,8 +421,15 @@ class JavaScriptDomain(Domain): if pkg_docname in docnames: self.modules[mod_name] = (pkg_docname, node_id) - def find_obj(self, env: BuildEnvironment, mod_name: str, prefix: str, name: str, - typ: str, searchorder: int = 0) -> tuple[str, tuple[str, str, str]]: + def find_obj( + self, + env: BuildEnvironment, + mod_name: str, + prefix: str, + name: str, + typ: str | None, + searchorder: int = 0 + ) -> tuple[str | None, tuple[str, str, str] | None]: if name[-2:] == '()': name = name[:-2] @@ -471,7 +478,7 @@ class JavaScriptDomain(Domain): for refname, (docname, node_id, typ) in list(self.objects.items()): yield refname, refname, typ, docname, node_id, 1 - def get_full_qualified_name(self, node: Element) -> str: + def get_full_qualified_name(self, node: Element) -> str | None: modname = node.get('js:module') prefix = node.get('js:object') target = node.get('reftarget') |