In my code I have
X_DEFAULT = ['a', 'long', 'list', 'of', 'values', 'that', 'is', 'really', 'ugly', 'to', 'see', 'over', 'and', 'over', 'again', 'every', 'time', 'it', 'is', 'referred', 'to', 'in', 'the', 'documentation']
and later
def some_function(..., x=X_DEFAULT, ...):
so in my Sphinx documentation, using (e.g. using .. autofunction::, etc.), I get all the long and cumbersome value X_DEFAULTextended in the signature for some_function:
some_function (..., x = ['a', 'long', 'list', 'of', 'values',' that ',' "is", "really", "ugly", "k", "see", "above", "and", "above", "again", "everyone", "time", "this", "is", "refer", "to", "to", "to ", 'documentation'], ...)
Is there a way to suppress this substitution in the generated documentation, ideally with reference to the definition X_DEFAULT:
some_function ( ..., x = X_DEFAULT , ... )
I know that I can manually override the signature for each function and method, which I explicitly list as arguments for the Sphinx documentation directives, but that is not my goal here. I also know that I could use the autodoc_docstring_signaturefirst docstring line too, but this would create bad docstrings really meant for cases where introspection fails (like C). I suspect that there is something that I could do in autodoc-process-signaturethat might be adequate (but not ideal), although I am not sure how to proceed.