From 14e4e1cf22559b74e87d22086eecaf3a2df29bc3 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 25 Nov 2017 14:37:21 +0800 Subject: [PATCH] Hack-patch Sphinx so that ARTIQ-Python types are correctly printed. Modification proposed to Sphinx but my issue is getting ignored. Closes #741 --- doc/manual/conf.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/manual/conf.py b/doc/manual/conf.py index dab2d6d6e..9605e9015 100644 --- a/doc/manual/conf.py +++ b/doc/manual/conf.py @@ -20,6 +20,12 @@ import sphinx_rtd_theme from unittest.mock import MagicMock +# Hack-patch Sphinx so that ARTIQ-Python types are correctly printed +# See: https://github.com/m-labs/artiq/issues/741 +from sphinx.ext import autodoc +autodoc.repr = str + + class Mock(MagicMock): @classmethod def __getattr__(cls, name):