pdoc3 / pdoc

:snake: :arrow_right: :scroll: Auto-generate API documentation for Python projects
https://pdoc3.github.io/pdoc/
GNU Affero General Public License v3.0
1.12k stars 145 forks source link

Another question about preserving whitespace with Google formatting #371

Closed SumNeuron closed 2 years ago

SumNeuron commented 2 years ago

Expected Behavior

That pdoc3 respects this doctoring formatting and each argument gets a new line.

'''
    Ensures the specified range is of specified length.  

    Arguments:  
        start (int): the start of the range    
        stop (int):  the stop of the range    
        length (int): the desired length of the range    
        position (None / int): pads using position as the start position for the  
            padding. Defaults to `None`. If `None`, the padding will be applied  
            randomly.    
        min (int): the minimum value the range (start) could take. Defualts to 0.    
        max (int): the minimum value the range (stop) could take. Defualts to `inf`.    

    Returns:    
        padded_start (int): the new start of the range    
        padded_stop (int): the new stop of the range    
    '''

Actual Behavior

'''
Ensures the specified range is of specified length.  Arguments:  start (int): the start of the range stop (int):  the stop of the range  length (int): the desired length of the range  position (None / int): pads using position as the start position for the padding. Defaults to `None`. If `None`, the padding will be applied  randomly. min (int): the minimum value the range (start) could take. Defualts to 0.  max (int): the minimum value the range (stop) could take. Defualts to `inf`.    Returns: padded_start (int): the new start of the range padded_stop (int): the new stop of the range    
    '''

Additional info

kernc commented 2 years ago

As indicated by the covering test, seems to work with v0.10.0.

If you can narrow it down further, it's appreciated if you can provide a full MWE: https://github.com/pdoc3/pdoc/blob/4aa70de2221a34a3003a7e5f52a9b91965f0e359/CONTRIBUTING.md#L14-L18