From: Vladimír Vondruš Date: Tue, 24 Sep 2024 16:59:59 +0000 (+0200) Subject: documentation/python: and yes, these two branches were impossible to hit. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=8c852b0d1d61250820754746ce1b266218694183;p=blog.git documentation/python: and yes, these two branches were impossible to hit. Wouldn't have discovered that without the parent commit. --- diff --git a/documentation/python.py b/documentation/python.py index 84172b9b..0df9c6a7 100755 --- a/documentation/python.py +++ b/documentation/python.py @@ -837,8 +837,6 @@ def make_relative_name(state: State, referrer_path: List[str], name): return '.'.join(shortened_path) def make_name_link(state: State, referrer_path: List[str], name) -> str: - if name is None: - return None assert isinstance(name, str) # Not found, return as-is. However, if the prefix is one of the @@ -1422,10 +1420,7 @@ def extract_enum_doc(state: State, entry: Empty): docstring = entry.object.__doc__ out.base = extract_type(entry.object.__base__) - if out.base: - out.base_link = make_name_link(state, entry.path, out.base) - else: - out.base, out.base_link = None, None + out.base_link = make_name_link(state, entry.path, out.base) for i in entry.object: value = Empty()