chiark / gitweb /
documentation/python: and yes, these two branches were impossible to hit.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 24 Sep 2024 16:59:59 +0000 (18:59 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Sat, 28 Sep 2024 01:25:37 +0000 (03:25 +0200)
Wouldn't have discovered that without the parent commit.

documentation/python.py

index 84172b9be3ea06752d944c9edcc9fd5596cd2b3b..0df9c6a71bdcbae7906dff0719a87e5ad146f5ff 100755 (executable)
@@ -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()