heavenshell / vim-pydocstring

Generate Python docstring to your Python source code.
BSD 3-Clause "New" or "Revised" License
337 stars 53 forks source link

Comment in function arguments terminate argument parsing #64

Closed LucaZampieri closed 4 years ago

LucaZampieri commented 4 years ago

If a line is commented inside in the list of arguments, we get an incomplete docstring.

minimal example:

def get_adjacency(
    facets,                                                                                                                                                                                                        
    points=None,
    max_degree=None,
    # num_verts=2,
    n_verts=3,
):
    """get_adjacency

    :param facets:
    :param points:
    :param max_degree:
    """

Where we can see that the argument parsing stops at the first encountered comment. (This is not at all urgent, I just posted the issue for posterior documentation)

LucaZampieri commented 4 years ago

Note that this is also the case for:


def get_adjacency(
    facets,                                                                                                                                                                                                        
    points=None,
    max_degree=None, # change num_verts
    num_verts=2,
):
    """get_adjacency

    :param facets:
    :param points:
    :param max_degree:
    """
Where the parsing also got stopped at the comment
heavenshell commented 4 years ago

ver 2.0.0 was released and fixed this issue. Please try. Kapture 2020-02-22 at 22 49 53

LucaZampieri commented 4 years ago

wahou! Thanks a lot!!