From 02e98fa2533bb1c5fdeede0031446bd389efe812 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 27 Sep 2024 15:41:07 +0200 Subject: [PATCH] documentation/python: the plain type name wasn't correctly name-mapped. Fortunately the template uses the type_link property, so this bug wasn't really visible anywhere. --- documentation/python.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/python.py b/documentation/python.py index 2e3988ce..2bb70124 100755 --- a/documentation/python.py +++ b/documentation/python.py @@ -1384,9 +1384,9 @@ def extract_annotation(state: State, referrer_path: List[str], annotation) -> Tu return ('None', ) + make_name_relative_link(state, referrer_path, 'None') # Otherwise it's a plain type. Turn it into a link. - name = extract_type(annotation) + name = map_name_prefix(state, extract_type(annotation)) # TODO Python 3.8+ supports `a, *b`, switch to that once 3.7 is dropped - return (name, ) + make_name_relative_link(state, referrer_path, map_name_prefix(state, name)) + return (name, ) + make_name_relative_link(state, referrer_path, name) def extract_module_doc(state: State, entry: Empty): assert inspect.ismodule(entry.object) -- 2.30.2