Skip to content

Commit

Permalink
manual: ligher mock for artiq.gui.applets. Closes m-labs#1293
Browse files Browse the repository at this point in the history
  • Loading branch information
sbourdeauducq committed May 7, 2019
1 parent 6a05326 commit 8d030a3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/manual/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
autodoc.repr = str


# we cannot use autodoc_mock_imports (does not help with argparse)
mock_modules = ["artiq.gui.waitingspinnerwidget",
"artiq.gui.flowlayout",
"artiq.compiler.module",
Expand All @@ -39,6 +40,14 @@
sys.modules[module] = Mock()


# https://stackoverflow.com/questions/29992444/sphinx-autodoc-skips-classes-inherited-from-mock
class MockApplets:
class AppletsDock:
pass

sys.modules["artiq.gui.applets"] = MockApplets


# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand Down

0 comments on commit 8d030a3

Please sign in to comment.