PEP 727: Documentation Metadata in Typing

Since it hasn’t been mentioned, I thought I’d share the PyCharm features here as prior art of how Google Style docstrings can be parsed and provide a good user experience (it wouldn’t be hard for Pylance/VS Code to implement this I bet).

PyCharm supports setting your docstring format to “Google”:

When this is enabled, the first thing PyCharm will do is that when you type """ after a function, it will pre-populate the docstring Args:

If you are missing/mispell a parameter, you get a warning:

Screenshot 2023-12-13 at 9.37.34 AM

Pressing Alt+Enter quick fix on the missing parameter will allow for auto-inserting it into the docstring:

The docstrings are rendered nicely for the user when using Quick-doc:

Screenshot 2023-12-13 at 9.39.09 AM

Argument names are autocompleted:

The section title blocks are autocompleted:

Google Style Docstring Community Support

Google style docstrings are already supported in a variety of other tools:

13 Likes