Merge pull request #7244 from tk0miya/refactor_type_annotation2

refactor: Update type annotation for python domain
This commit is contained in:
Takeshi KOMIYA 2020-03-04 00:42:18 +09:00 committed by GitHub
commit 8dd83a540e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1034,7 +1034,8 @@ class PythonDomain(Domain):
self.modules[modname] = data
def find_obj(self, env: BuildEnvironment, modname: str, classname: str,
name: str, type: str, searchmode: int = 0) -> List[Tuple[str, Any]]:
name: str, type: str, searchmode: int = 0
) -> List[Tuple[str, Tuple[str, str]]]:
"""Find a Python object for "name", perhaps using the given module
and/or classname. Returns a list of (name, object entry) tuples.
"""
@ -1045,7 +1046,7 @@ class PythonDomain(Domain):
if not name:
return []
matches = [] # type: List[Tuple[str, Any]]
matches = [] # type: List[Tuple[str, Tuple[str, str]]]
newname = None
if searchmode == 1: