Hello,
I'm using autodoc in Sphinx 3.2.1 and have a problem where it reports formatting errors from what I think is the `dict` docstring rather than my code. I have a module (`node`) which contains a dict:
#: Colour map to use when writing Invoke schedule to terminal.
SCHEDULE_COLOUR_MAP = {"Schedule": "white",
"Loop": "red",
"GlobalSum": "cyan"}
This module is then made available in the __all__ list of the __init__.py of the package
containing the module, i.e. I have an __init__.py that contains:
from nodes.node import SCHEDULE_COLOUR_MAP
__all__ = ['SCHEDULE_COLOUR_MAP']
When running Sphinx autodoc I see:
/blah blah/nodes/__init__.py:docstring of psyclone.psyir.nodes.SCHEDULE_COLOUR_MAP:3: WARNING: Unexpected indentation.
/blah blah/nodes/__init__.py:docstring of psyclone.psyir.nodes.SCHEDULE_COLOUR_MAP:4: WARNING: Block quote ends without a blank line; unexpected unindent.
/blah blah/nodes/__init__.py:docstring of psyclone.psyir.nodes.SCHEDULE_COLOUR_MAP:7: WARNING: Unexpected indentation.
/blah blah/psyir/nodes/__init__.py:docstring of psyclone.psyir.nodes.SCHEDULE_COLOUR_MAP:9: WARNING: Inline strong start-string without end-string.
As you can see, I've tried explicitly adding a docstring for the dict using the `#:` markup but that doesn't seem to get picked up.
I get exactly the same problem with a different dictionary in a different module.
Am I doing something wrong here?
Many thanks,
Andy.