Make 'Google' the default docstring style for ALL projects PyCharm

This isn't possible to do at the moment. Please submit a feature request about it to https://youtrack.jetbrains.com/issues/PY

EDIT: The following ticket (mentioned below) is now in In Progress status https://youtrack.jetbrains.com/issue/PY-20243. According to Fix versions field, it should be implemented in 2019.3 version.


At the time of this writing, it is not possible. Several tickets have been submitted over the past several years requesting this feature, presumably it is being worked on.

https://youtrack.jetbrains.com/issue/PY-33833

https://youtrack.jetbrains.com/issue/PY-20243

In the short run, if you need to convert previous projects from the default, you can find the setting is stored in the ".idea/MYPROJECT.iml" file:

  <component name="PyDocumentationSettings">
    <option name="myDocStringFormat" value="Google" />
  </component>

By default, there is no PyDocumentationSettings component, so you'll need to add it. In Linux, you could run the following (very hackish) code in terminal to change all projects in any subdirectory:

new_docstring='  <component name="PyDocumentationSettings">\n    <option name="myDocStringFormat" value="Google" />\n  </component>\n</module>'
find . -type f -name '*.iml' -print0 | xargs -0 sed -i "s|</module>|$new_docstring|g"

If you simply wanted to go from e.g. Numpy to Google, you might just use:

find . -type f -name '*.iml' -print0 | xargs -0 sed -i "s|Numpy|Google|g"