mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Migrate to py3 style type annotation: sphinx.util
This commit is contained in:
parent
0cdd841515
commit
723e81c663
@ -122,8 +122,7 @@ def get_matching_docs(dirname: str, suffixes: List[str],
|
|||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
def get_filetype(source_suffix, filename):
|
def get_filetype(source_suffix: Dict[str, str], filename: str) -> str:
|
||||||
# type: (Dict[str, str], str) -> str
|
|
||||||
for suffix, filetype in source_suffix.items():
|
for suffix, filetype in source_suffix.items():
|
||||||
if filename.endswith(suffix):
|
if filename.endswith(suffix):
|
||||||
# If default filetype (None), considered as restructuredtext.
|
# If default filetype (None), considered as restructuredtext.
|
||||||
|
Loading…
Reference in New Issue
Block a user