I have a dictionary in Python project source code which describes default configuration values. The dictionary is quite lengthy. I\'d like to see dictionary in Sphinx docume
y'all i have done it but you are not going to believe me because it is literally five lines with imports. roast me in the replies but this has been working for a week or two and i haven't noticed it breaking anything.
This is in conf.py
:
from pprint import pformat
def object_description(object) -> str:
return pformat(object, indent=4)
from sphinx.util import inspect
inspect.object_description = object_description
this takes yer ~uh oh~
into a ~uh huh~
edit: fixed images b/c got the ~rep~ enough to have them