manu-chroma / username-availability-checker

Live at : https://username-check.herokuapp.com/
96 stars 36 forks source link

Fix docstrings to follow pep257 #101

Closed jayvdb closed 6 years ago

jayvdb commented 6 years ago

And use pydocstyle (or the coala bear) to verify docstrings are compliant.

jayvdb commented 6 years ago

The PR used two different styles, and majority of the docstrings now use a style not supported by coala's QuoteBear. Oddly, @seeeturtle knew it was unsupported. https://github.com/coala/coala-bears/issues/1104

The docstrings should use the currently existing style.

jayvdb commented 6 years ago

So it turns out QuotesBear is disabled for multiline strings, so both styles are usable, however ...

The style for single line docstrings still needs to be established.

"""Do stuff.""" isnt possible.

I think this is extremely ugly, and probably violates pep257:

"""
Do stuff."""

And the following looks ok when only single line are considered.

"""Do stuff.
"""

But to retain consistency, multi-line must follow the same style and thus look like the following, which is also ugly:

"""Do stuff.

Foo bar.
"""

This is why it is still necessary to use the empty line 0 style:

"""
Do stuff.
"""
jayvdb commented 6 years ago

Note that this style also means the first line looses three characters, and every character lost is painful when trying to write good function descriptions.

"""Do stuff.
"""