Skip to content

Modifying default for argument does not update the type in the docstring #43

@Lightborne

Description

@Lightborne

For example, write this in a new document:

def function(arg=None):
    pass

Then run any of the commands that updates the docstring, to get this:

def function(arg=None):
    """Summary
    
    Args:
        arg (None, optional): Description
    """
    pass

Now modify the default value of the argument, and rerun the command to update the docstring. It will not update with the new default value:

def function(arg=[]):
    """Summary
    
    Args:
        arg (None, optional): Description
    """
    pass

Note that arg still specifies a None type in the docstring, where it should be a list. This is what I believe the docstring should change to:

def function(arg=[]):
    """Summary
    
    Args:
        arg (list, optional): Description
    """
    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