forked from M-Labs/artiq
1
0
Fork 0

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 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 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): class Mock(MagicMock):
@classmethod @classmethod
def __getattr__(cls, name): def __getattr__(cls, name):