Skip to content

Google docs to reST difficulties with arg type + description #89

Open
@tristanlatr

Description

@tristanlatr

Hello,

I'm trying to convert automatically google docstrings to reST but not all infos seem to be parsed.

The description do not show up in the patch when the argument type is specified in the parenthesis. Only the type and the default value actually appears.

Any help would be appreciated!

Thanks :)

The following code

def qry_load_data(self, retry=1, wait_timeout_sec=120):
    """
    Internal

    Helper method to execute the query and load the data:
        - Submit the query
        - Wait the query to be executed
        - Get and parse the events

    Arguments:
        retry (int): number of time the query can be failed and retried
        wait_timeout_sec (int): wait timeout in seconds

    Returns: 
        tuple: (`msiempy.event.EventManager`, Query completed? `bool`)

    Raises:
        msiempy.core.session.NitroError if any unhandled errors.
        TimeoutError if wait_timeout_sec counter gets to 0.
    """
    pass

Generate the following patch

# Patch generated by Pyment v0.3.3

--- a/test.py
+++ b/test.py
@@ -1,21 +1,16 @@
 def qry_load_data(self, retry=1, wait_timeout_sec=120):
-    """
-    Internal
-
+    """Internal
+    
     Helper method to execute the query and load the data:
         - Submit the query
         - Wait the query to be executed
         - Get and parse the events
 
-    Arguments:
-        retry (int): number of time the query can be failed and retried
-        wait_timeout_sec (int): wait timeout in seconds
+    :param retry: int (Default value = 1)
+    :param wait_timeout_sec: int (Default value = 120)
+    :returns: tuple: (`msiempy.event.EventManager`, Query completed? `bool`)
+    :raises msiempy.core.session.NitroError: if any unhandled errors
+    :raises TimeoutError: if wait_timeout_sec counter gets to 0
 
-    Returns: 
-        tuple: (`msiempy.event.EventManager`, Query completed? `bool`)
-
-    Raises:
-        msiempy.core.session.NitroError if any unhandled errors.
-        TimeoutError if wait_timeout_sec counter gets to 0.
     """
     pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions