diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-01-02 16:45:48 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-02 16:45:48 +0900 |
commit | 860d7ab5062d348ac78dd984045356ea2bb33bb5 (patch) | |
tree | a9fba76f4eb28e1dc1c272ccfa9ebf18e9337626 | |
parent | 8f1fdc46a068ffea9001c5398c256af6a4c6e418 (diff) | |
parent | 116ff0245173c3cdde9e05e8c29fc9baeb1628e2 (diff) | |
download | sphinx-git-860d7ab5062d348ac78dd984045356ea2bb33bb5.tar.gz |
Merge pull request #5873 from tk0miya/fix_typehints_for_autosummary
Update annotations for autosummary
-rw-r--r-- | sphinx/ext/autosummary/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py index 1aa0e3e35..525b1d537 100644 --- a/sphinx/ext/autosummary/__init__.py +++ b/sphinx/ext/autosummary/__init__.py @@ -552,12 +552,12 @@ def limited_join(sep, items, max_chars=30, overflow_marker="..."): # -- Importing items ----------------------------------------------------------- def get_import_prefixes_from_env(env): - # type: (BuildEnvironment) -> List + # type: (BuildEnvironment) -> List[str] """ Obtain current Python import prefixes (for `import_by_name`) from ``document.env`` """ - prefixes = [None] # type: List + prefixes = [None] # type: List[str] currmodule = env.ref_context.get('py:module') if currmodule: @@ -574,7 +574,7 @@ def get_import_prefixes_from_env(env): def import_by_name(name, prefixes=[None]): - # type: (str, List) -> Tuple[str, Any, Any, str] + # type: (str, List[str]) -> Tuple[str, Any, Any, str] """Import a Python object that has the given *name*, under one of the *prefixes*. The first name that succeeds is used. """ |