Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm not displaying Google style docstrings in tooltips

I would like to use Google style docstrings for Python. I've specified that Pycharm should expect Google docstrings:

enter image description here

For some reason PyCharm will not show my docstrings in tooltips:

enter image description here

I'm referencing the examples here for the proper Google docstring format: http://www.sphinx-doc.org/en/stable/ext/example_google.html

It's unclear to me why PyCharm is not displaying my docstrings.

like image 810
Automaton Avatar asked Mar 06 '17 19:03

Automaton


People also ask

How do I enable docstring in PyCharm?

Press Ctrl+Alt+S and go to Editor | General |Smart Keys. Select the Insert type placeholders checkbox in the Smart Keys page of the editor settings. Place the caret at the function name, and press Alt+Enter . In the list of intention actions that opens, choose Insert documentation string stub.

How do you add a docstring in Python?

Declaring Docstrings: The docstrings are declared using ”'triple single quotes”' or “””triple double quotes””” just below the class, method or function declaration. All functions should have a docstring.

How do you access a docstring in Python?

Docstrings are accessible from the doc attribute (__doc__) for any of the Python objects and also with the built-in help() function. An object's docstring is defined by including a string constant as the first statement in the object's definition.

How does PyCharm create documentation?

To generate docutils documentationSelect DocUtil task run/debug configuration, and change it as required: specify the configuration name, input and output directories, and optional keys. Launch this run/debug configuration, as described in the section Run and rerun applications.


1 Answers

After contacting JetBrains they notified me that this was a known problem: https://youtrack.jetbrains.com/oauth?state=%2Fissue%2FPY-22445

The solution is to update the "pockets" package.

They plan to fix in next release.

Issue is due to using python version 3.6!

like image 116
Automaton Avatar answered Oct 15 '22 08:10

Automaton