Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

The first word in a docstring should be capitalized #164

Closed
Nurdok opened this issue Dec 8, 2015 · 4 comments
Closed

The first word in a docstring should be capitalized #164

Nurdok opened this issue Dec 8, 2015 · 4 comments
Assignees

Comments

@Nurdok
Copy link
Member

Nurdok commented Dec 8, 2015

This docstring

def foo():
    """return x."""

Should return an error in this style:

D4xx: First sentence of a docstring should be capitalized ("Return", not "return")

I haven't found a section in the original PEP that refers to capitalization, but all of the examples in the PEP are correctly capitalized. I'm wondering whether this new error should be checked by default. My instinct says that "a phrase ending in a period" (from the PEP) is a proper sentence, which should be capitalized, but I'm not sure if the PEP mandates it.

Does anyone have any thought regarding this?

@Nurdok Nurdok self-assigned this Dec 8, 2015
@sigmavirus24
Copy link
Member

So PEP 8 authors are typically happy to clarify their intentions. You can implement this while you wait for a response from the PEP 257 authors and then put it in the default ignore list if you'd like.

@Nurdok
Copy link
Member Author

Nurdok commented Dec 8, 2015

I sent them a query and will start working on this. Thanks for the suggestion.

@sigmavirus24
Copy link
Member

🍰

@Nurdok
Copy link
Member Author

Nurdok commented Dec 13, 2015

Implemented in #165

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants