summaryrefslogtreecommitdiffstats
path: root/docs/conf.py
blob: 8a03b2fbaa70c7602e63e5578ac59bf3ca823229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# yamllint documentation build configuration file, created by
# sphinx-quickstart on Thu Jan 21 21:18:52 2016.

import os
import sys
from unittest.mock import MagicMock

sys.path.insert(0, os.path.abspath('..'))
from yamllint import __copyright__, APP_NAME, APP_VERSION  # noqa: I001, E402

# -- General configuration ------------------------------------------------

extensions = [
    'sphinx_rtd_theme',
    'sphinx.ext.autodoc',
]

source_suffix = '.rst'

master_doc = 'index'

project = APP_NAME
copyright = __copyright__.lstrip('Copyright ')

version = APP_VERSION
release = APP_VERSION

pygments_style = 'sphinx'

# -- Options for HTML output ----------------------------------------------

html_theme = 'sphinx_rtd_theme'

htmlhelp_basename = 'yamllintdoc'

# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
    ('index', 'yamllint', 'Linter for YAML files', ['Adrien Vergé'], 1)
]

# -- Build with sphinx automodule without needing to install third-party libs


class Mock(MagicMock):
    @classmethod
    def __getattr__(cls, name):
        return MagicMock()


MOCK_MODULES = ['pathspec', 'yaml']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)