Skip to content

Rerunning PydocstringFormat deletes file contents if docstrings already present #104

@jrwrigh

Description

@jrwrigh

If you run :PydocstringFormat on a file that already has docstrings, it simply deletes the contents of the file.

#!/usr/bin/env python

def formGrid(x, y=None):
    z = x + y

    return z

Run :PydocstringFormat:

#!/usr/bin/env python

def formGrid(x, y=None):
    """formGrid.   
      
    Parameters    
    ----------
    x :
        x
    y :
        y
    """
    z = x + y

    return z

Then running it again deletes the contents of the file.

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