Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The first word in a docstring should be capitalized #164

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

Comments

Projects
None yet
2 participants
@Nurdok
Copy link
Member

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

This comment has been minimized.

Copy link
Member

commented Dec 8, 2015

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

This comment has been minimized.

Copy link
Member Author

commented Dec 8, 2015

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

@sigmavirus24

This comment has been minimized.

Copy link
Member

commented Dec 8, 2015

🍰

@Nurdok

This comment has been minimized.

Copy link
Member Author

commented Dec 13, 2015

Implemented in #165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.