forked from M-Labs/artiq
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:
parent
25d3fc1e55
commit
14714d3f9d
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue