[arvados] updated: 2.7.0-5030-g0708f5dd30

git repository hosting git at public.arvados.org
Fri Oct 20 16:09:42 UTC 2023


Summary of changes:
 sdk/python/discovery2pydoc.py | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

       via  0708f5dd30018816be89fc3ec02c29b9ecb92953 (commit)
      from  7b51c206b53b1c542be66bd0e277ff2ad87894c0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0708f5dd30018816be89fc3ec02c29b9ecb92953
Author: Brett Smith <brett.smith at curii.com>
Date:   Fri Oct 20 11:57:45 2023 -0400

    20885: Update argument docstrings after pdoc migration
    
    Update arvados.api_resources to use our new function argument format.
    
    Refs #20885.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/sdk/python/discovery2pydoc.py b/sdk/python/discovery2pydoc.py
index c827de5e86..6ca3aafeb6 100755
--- a/sdk/python/discovery2pydoc.py
+++ b/sdk/python/discovery2pydoc.py
@@ -182,13 +182,17 @@ class Parameter(inspect.Parameter):
         if default_value is None:
             default_doc = ''
         else:
-            default_doc = f" Default {default_value!r}."
-        # If there is no description, use a zero-width space to help Markdown
-        # parsers retain the definition list structure.
-        description = self._spec['description'] or '\u200b'
+            default_doc = f"Default {default_value!r}."
+        description = self._spec['description']
+        doc_parts = [f'{self.api_name}: {self.annotation}']
+        if description or default_doc:
+            doc_parts.append('---')
+            if description:
+                doc_parts.append(description)
+            if default_doc:
+                doc_parts.append(default_doc)
         return f'''
-{self.api_name}: {self.annotation}
-: {description}{default_doc}
+* {' '.join(doc_parts)}
 '''
 
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list