Hack-patch Sphinx so that ARTIQ-Python types are correctly printed.

Modification proposed to Sphinx but my issue is getting ignored.

Closes #741
This commit is contained in:
Sebastien Bourdeauducq 2017-11-25 14:37:21 +08:00
parent 25d3fc1e55
commit 14714d3f9d
1 changed files with 6 additions and 0 deletions

View File

@ -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):