Skip to content

Docstrings using reST missing formatting. #243

Closed
@nimbusscale

Description

@nimbusscale

I get that there is limited support for reST, but docstrings using that format seem to turn into a jumbled mess in the HTML documentation as the carriage returns are stripped out. Is there a way to just have the docs include the docstring as a preformatted text? I didn't see this option in the docs, so if I missed it then I apologize.

For example, I have this function:

`def clear_evaluations(rule_name: str, region: str = None, session: boto3.Session = boto3.Session()) -> None:
"""Clears the evaluations for a specified config rule.

:param rule_name: Name of the config rule.
:param region: Region where the config rule is configured.
:param session: A boto3 session, can be used to facilitate using a cross-account
:return: None
"""`

But in the HTML docs it shows up as shown in this screenshot which is hard for a human to read:

image

I tried the Google style and that does come out formatted well, but all our docstrings are in reST given that is the default for PyCahrm. I don't care about bolding or any other format of the text, just want the carriage return preserved so it's human-readable.

Thanks for any guidance you can provide.

Additional info

  • pdoc version:

$ pip freeze | grep pdoc pdoc3==0.8.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions