From: Sergei Izmailov Date: Sat, 16 May 2020 14:33:51 +0000 (+0300) Subject: documentation/python: add Iterable to recognized typing types. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=c4f8caf6fe8254d82e5e63ef587b7bddbd91fb52;p=blog.git documentation/python: add Iterable to recognized typing types. --- diff --git a/documentation/python.py b/documentation/python.py index 21fa5171..7dbce47f 100755 --- a/documentation/python.py +++ b/documentation/python.py @@ -798,7 +798,7 @@ def _pybind11_default_argument_length(string): raise SyntaxError("Unexpected end of `{}`".format(string)) def map_name_prefix_or_add_typing_suffix(state: State, input_type: str): - if input_type in ['Callable', 'Dict', 'Iterator', 'List', 'Optional', 'Set', 'Tuple', 'Union']: + if input_type in ['Callable', 'Dict', 'Iterator', 'Iterable', 'List', 'Optional', 'Set', 'Tuple', 'Union']: return 'typing.' + input_type else: return map_name_prefix(state, input_type)