Migrate to py3 style type annotation: sphinx.util

This commit is contained in:
Takeshi KOMIYA 2019-12-25 01:00:00 +09:00
parent 0cdd841515
commit 723e81c663

View File

@ -122,8 +122,7 @@ def get_matching_docs(dirname: str, suffixes: List[str],
break
def get_filetype(source_suffix, filename):
# type: (Dict[str, str], str) -> str
def get_filetype(source_suffix: Dict[str, str], filename: str) -> str:
for suffix, filetype in source_suffix.items():
if filename.endswith(suffix):
# If default filetype (None), considered as restructuredtext.