PyCQA / docformatter

Formats docstrings to follow PEP 257
https://pypi.python.org/pypi/docformatter
MIT License
530 stars 62 forks source link

First word is not capitalized if summary ends with dot #184

Closed jonathanberthias closed 1 year ago

jonathanberthias commented 1 year ago

There is a small bug related to first word capitalization.

If the summary ends with a dot, then the first word is not capitalized. If the dot is missing, then it is added and the first word is capitalized.

Example:

Running with no options:

def f():
    """this is a docstring summary"""
    return 0

gets fixed to:

def f():
    """This is a docstring summary."""
    return 0

But

def f():
    """this is a docstring summary."""
    return 0

is not changed by docformatter.