From c8fdf0aba92325767e244819720f97b9ea64fa3f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 13 Jul 2019 17:52:16 +0200 Subject: [PATCH] documentation/python: doc++ --- documentation/python.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/documentation/python.py b/documentation/python.py index 2e0362bc..b62e1315 100755 --- a/documentation/python.py +++ b/documentation/python.py @@ -847,7 +847,7 @@ def extract_function_doc(state: State, parent, path: List[str], function) -> Lis # TODO: external summary for functions out.summary = summary - # Don't show None return type for void functions + # Don't show None return type for functions w/o a return out.type = None if type == 'None' else type if out.type: out.type = make_name_link(state, path, out.type) @@ -1372,6 +1372,8 @@ def run(basedir, config, templates): if urllib.parse.urlparse(path).netloc: return path path = [path] entry = state.name_map['.'.join(path)] + # TODO: this will blow up if linking to something that's not a module, + # class or a page return state.config['URL_FORMATTER'](entry.type, entry.path)[1] env.filters['basename_or_url'] = basename_or_url -- 2.30.2