mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
60 lines
1.3 KiB
Python
60 lines
1.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
sphinx.builders.dummy
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
Do syntax checks, but no writing.
|
|
|
|
:copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
|
|
:license: BSD, see LICENSE for details.
|
|
"""
|
|
|
|
|
|
from sphinx.builders import Builder
|
|
|
|
if False:
|
|
# For type annotation
|
|
from typing import Any, Dict, Set # NOQA
|
|
from docutils import nodes # NOQA
|
|
from sphinx.application import Sphinx # NOQA
|
|
|
|
|
|
class DummyBuilder(Builder):
|
|
name = 'dummy'
|
|
allow_parallel = True
|
|
|
|
def init(self):
|
|
# type: () -> None
|
|
pass
|
|
|
|
def get_outdated_docs(self):
|
|
# type: () -> Set[unicode]
|
|
return self.env.found_docs
|
|
|
|
def get_target_uri(self, docname, typ=None):
|
|
# type: (unicode, unicode) -> unicode
|
|
return ''
|
|
|
|
def prepare_writing(self, docnames):
|
|
# type: (Set[unicode]) -> None
|
|
pass
|
|
|
|
def write_doc(self, docname, doctree):
|
|
# type: (unicode, nodes.Node) -> None
|
|
pass
|
|
|
|
def finish(self):
|
|
# type: () -> None
|
|
pass
|
|
|
|
|
|
def setup(app):
|
|
# type: (Sphinx) -> Dict[unicode, Any]
|
|
app.add_builder(DummyBuilder)
|
|
|
|
return {
|
|
'version': 'builtin',
|
|
'parallel_read_safe': True,
|
|
'parallel_write_safe': True,
|
|
}
|