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

Python: Should Raises be after Return in google style? #193

Open
hassec opened this issue Aug 5, 2024 · 1 comment · May be fixed by #194
Open

Python: Should Raises be after Return in google style? #193

hassec opened this issue Aug 5, 2024 · 1 comment · May be fixed by #194

Comments

@hassec
Copy link

hassec commented Aug 5, 2024

I noticed that the generated doc always has the Raises: section before Returns:. If I understand correctly, this is due to the current template looking like:

{ i.HasThrow, "Raises:", { type = { "func" } } },
{ i.Throw, " %s: $1", { type = { "func" } } },
{ i.HasReturn, "", { type = { "func" } } },
{ i.HasReturn, "Returns:", { type = { "func" } } },
{ i.HasReturn, " $1", { type = { "func" } } },

The Google Style Guide has Raises: after Returns: in all examples.

Should we follow the pattern suggested in the style guide and move Raises: after Returns:?

@danymat
Copy link
Owner

danymat commented Aug 5, 2024

Seems to be the way
I confirm we can change it the other way around then

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

Successfully merging a pull request may close this issue.

2 participants