From 8f444c373f4612c68cc5c1265e7d7b7a70be9385 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Wed, 25 Mar 2020 00:41:12 +0900 Subject: [PATCH] refactor: Update type annotation for autosummary --- sphinx/ext/autosummary/generate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinx/ext/autosummary/generate.py b/sphinx/ext/autosummary/generate.py index 932856aa6..61c3bae3e 100644 --- a/sphinx/ext/autosummary/generate.py +++ b/sphinx/ext/autosummary/generate.py @@ -326,7 +326,7 @@ def find_autosummary_in_files(filenames: List[str]) -> List[AutosummaryEntry]: return documented -def find_autosummary_in_docstring(name: str, module: Any = None, filename: str = None +def find_autosummary_in_docstring(name: str, module: str = None, filename: str = None ) -> List[AutosummaryEntry]: """Find out what items are documented in the given object's docstring. @@ -346,7 +346,7 @@ def find_autosummary_in_docstring(name: str, module: Any = None, filename: str = return [] -def find_autosummary_in_lines(lines: List[str], module: Any = None, filename: str = None +def find_autosummary_in_lines(lines: List[str], module: str = None, filename: str = None ) -> List[AutosummaryEntry]: """Find out what items appear in autosummary:: directives in the given lines.