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

Modification proposed to Sphinx but my issue is getting ignored.

Closes #741
pull/875/head
Sebastien Bourdeauducq 2017-11-25 14:37:21 +08:00
parent 7f15f50878
commit 14e4e1cf22
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):