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

Added a clause for "indented-line" blocks for the Python style guide #537

Closed
wants to merge 1 commit into from

Conversation

ColinKennedy
Copy link

There's a discussion going on in pydocstyle (Reference: PyCQA/pydocstyle#449) about what whitespace options are allowed under google's style guide. In this issue submitted to this repository, it was mentioned that using indented lines is allowed by Google's current linters.

Would it be alright to add an explicit example?

@gpshead gpshead self-assigned this Mar 9, 2020
@rmorshea
Copy link

@gpshead any progress on this?

def print_data(verbose):
"""Prints information about the user's environment.

Args:
Copy link

Choose a reason for hiding this comment

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

Can we also clarify what to do in case of a mix of both the styles? And add an example for that as well?

Choose a reason for hiding this comment

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

If I recall, there'd been some discussion here in favor of allowing mixed styles across a code base, but not within a single docstring. That may be over prescriptive though and should probably be decided by someone at google. cc: @gpshead

Copy link
Contributor

Choose a reason for hiding this comment

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

in general i favor not being over prescriptive about that. the main consistency thing is the indentation level (which is already mentioned). but trying to enumerate a matrix of possible argument or exception and their descriptions style mixes for things would explode meaninglessly and become an enemy of documentation. :)

Copy link
Author

Choose a reason for hiding this comment

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

As long as "hanging indent" style is allowed by the standard, I'm happy for maintainers of tools to decide whether or not to enforce consistency. Avoiding being over prescriptive and having the option to pick the right look for the right doc would be a great thing.

@ColinKennedy
Copy link
Author

@gpshead could you please update on this review? Or give details on how to advance this PR?

@gpshead
Copy link
Contributor

gpshead commented May 29, 2020

I just mailed an internal change that should address this. I'll make sure the the external guide is synced after that goes in.

@gpshead
Copy link
Contributor

gpshead commented Jul 16, 2020

An update including my internal change addressing this has been pushed.

@gpshead gpshead closed this Jul 16, 2020
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.

None yet

5 participants