PyCharm 2018.2.2 doesn't render reStructuredText documentation correctly

Issue Details:

For some reason, PyCharm Professional 2018.2.2 won't render code documentation with reStructuredText using inline type declaration

For example: I have the following following code in one of my projects:

def message_to_texts(message):
    """

    :param message: A Message Object returned from the Gmail service.users().messages().get() method
    :type message: dict
    :return: List of texts decoded from base64 into normal texts. This is returned as a list since messages can be fragmented
    """

If I press ctrl+Q to see the documentation for it, it generates the following: 

But then if I change the code from

:param message: blah blah blah
:type message: dict

 to 

:param dict message: blah blah blah

it breaks the documentation and generates the following:

For something like the following code, it'll just completely discard the parameter comments:

def set_word_index_from_data(self, data, serial_file=None, overwrite=True):
"""

:param list data: List of UTF-8 Strings Given as Training Data
:param str serial_file: Path to Word Index JSON file
:param bool overwrite: Flag that indicates whether or not the existing data should be overwritten
:return: Nothing
"""

if I try to follow along with the example given in https://www.jetbrains.com/help/pycharm/using-docstrings-to-specify-types.html, using the same code, I get this as a result: 

This is the code which produced the above result:

class SimpleEquation:
def demo(self, a, b, c):
"""

:param a: quadratic coefficient
:type a: float
:param b: linear coefficient
:type b: float
:param c: free term
:type c: int
"""
d = math.sqrt(b ** 2 - 4 * a * c)
root1 = (-b + d) / (2 * a)
root2 = (-b - d) / (2 * a)
print(root1, root2)

 

I've tried the following solutions that other people have given: 

I've also tried to install the Sphinx package and then run the Sphinx quickstart from tools, but none of it has worked. 

I've also tried deleting the configuration file and then running 

$ sudo snap remove pycharm-professional
$ sudo snap install --classic pycharm-professional

To reinstall pycharm, and it doesn't fix the issue. 

Temporary Fix:

Just before making this post I tried to use an older version of PyCharm (2018.1.4) and it fixes the issue. I'm not quite sure what it is, but after a fresh install of the 2018.1.4 tarballs I'm successfully getting the correct documentation:

This is definitely an issue with the latest version (Professional 2018.2.2), and NOT the settings that I was using, since I had deleted the settings during the reinstall from snap. 

For what it's worth, this is what I'm running:

Pycharm Professional 2018.2.2
Ubuntu 18.04 LTS

 

 

 

2
2 comments

having the same issue, cannot even use code blocks

.. code-block is not even recognized and autocomplete does not kick in with the plugin loaded

0

Hey Angelo,

Have you tried with the latest version 2018.3.4 ? If it's reproduced in the latest version, I think it warrants a bug report.

0

Please sign in to leave a comment.