Skip to content

0.7

Compare
Choose a tag to compare
@douglasdavis douglasdavis released this 04 Mar 15:51
· 8 commits to main since this release
0.7
1b8c5ef

Replace instances of " | None" with ", optional" in the argument type of docstring.

For example:

f(a: int, b: int | str | None = None) -> float:
    pass

will have a docstring of the form:

def f(a: int | str | None) -> float:
    """FIXME: Short description.

    FIXME: Long description.

    Parameters
    ----------
    a : int
        FIXME: Add docs.
    b : int | str, optional    <---- (new! previous version would have "a : int | str | None")
        FIXME: Add docs.

    Returns
    -------
    float
        FIXME: Add docs.

    Examples
    --------
    FIXME: Add docs.

    """
    pass