From 3ecfa5659ebc48fa29b4576c7a38a8a69bfcf88d Mon Sep 17 00:00:00 2001 From: nutti Date: Wed, 17 Jul 2024 21:06:04 +0900 Subject: [PATCH] PyDocs: distinguish between tuple and union data types Ref: !124879 --- doc/python_api/sphinx_doc_gen.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 2a419e2e7b6..5b925740c0e 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -1394,11 +1394,8 @@ def pycontext2sphinx(basepath): ) else: type_strs.append(member_type) - if len(type_strs) == 1: - member_type_str = type_strs[0] - else: - member_type_str = "({:s})".format(", ".join(type_strs)) - fw(" :type: {:s}\n\n".format(member_type_str)) + + fw(" :type: {:s}\n\n".format(" or ".join(type_strs))) write_example_ref(" ", fw, "bpy.context." + member) # Generate type-map: