Skip to content

Commit

Permalink
Update sphinx configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
insspb committed Jun 7, 2022
1 parent c8fbb31 commit 30c691e
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions docs/conf.py
Expand Up @@ -28,31 +28,6 @@

# flake8: noqa D107,D105


class Mock(object):
def __init__(self, *args, **kwargs):
pass

def __call__(self, *args, **kwargs):
return Mock()

@classmethod
def __getattr__(cls, name):
if name in ('__file__', '__path__'):
return '/dev/null'
elif name[0] == name[0].upper():
mockType = type(name, (), {})
mockType.__module__ = __name__
return mockType
else:
return Mock()


MOCK_MODULES = ['yaml']
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock()


# Add parent dir to path
cwd = os.getcwd()
parent = os.path.dirname(cwd)
Expand All @@ -78,7 +53,7 @@ def __getattr__(cls, name):
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx_click.ext',
'recommonmark',
'myst_parser',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -378,3 +353,9 @@ def __getattr__(cls, name):

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/3': None}
myst_enable_extensions = [
"tasklist",
"strikethrough",
"fieldlist",
]
myst_heading_anchors = 3

0 comments on commit 30c691e

Please sign in to comment.