danymat / neogen

A better annotation generator. Supports multiple languages and annotation conventions.
GNU General Public License v3.0
1.34k stars 56 forks source link

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

Open hassec opened 3 months ago

hassec commented 3 months ago

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:

https://github.com/danymat/neogen/blob/4b22542b96712a5a901fa909b7dc749251ae1625/lua/neogen/templates/google_docstrings.lua#L22-L26

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 commented 3 months ago

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