Skip to content

CLN: D208 Docstring is over-indented #31890

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

Merged

Conversation

simonjayhawkins
Copy link
Member

No description provided.

@@ -601,8 +601,7 @@ def __init__(self, value, converted, kind: str):
self.kind = kind

def tostring(self, encoding) -> str:
""" quote the string if not encoded
else encode and return """
""" quote the string if not encoded else encode and return """
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are the leading/trailing spaces policy?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not according to PEP257, but that seems to popular in our codebase. There is a codecheck in pydocstyle for this, D210. This is for one-line docstrings and we seem to moving away from those, see #31162, #31462 and others.

I was wandering whether to enforce D210 yet. May be able to find a checker to find one-liners.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would fail the numpy docstring check as well were this exposed as part of the API

@jbrockmendel
Copy link
Member

LGTM

@WillAyd WillAyd added this to the 1.1 milestone Feb 11, 2020
@WillAyd WillAyd merged commit 1117328 into pandas-dev:master Feb 11, 2020
@simonjayhawkins simonjayhawkins deleted the D208-Docstring-is-over-indented branch February 11, 2020 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants