GNUnet
0.22.2
flask.py
Go to the documentation of this file.
1
"""
2
sphinxcontrib.autohttp.flask
3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
5
The sphinx.ext.autodoc-style HTTP API reference builder (
from
Flask)
6
for
sphinxcontrib.httpdomain.
7
8
:copyright: Copyright 2011 by Hong Minhee
9
:license: BSD, see LICENSE
for
details.
10
11
"""
12
from __future__ import absolute_import
13
14
import re
15
import itertools
16
import six
17
18
from docutils import nodes
19
from docutils.parsers.rst import directives
20
from docutils.statemachine import ViewList
21
22
from sphinx.util import force_decode
23
from sphinx.util.compat import Directive
24
from sphinx.util.nodes import nested_parse_with_titles
25
from sphinx.util.docstrings import prepare_docstring
26
from sphinx.pycode import ModuleAnalyzer
27
28
from sphinxcontrib import httpdomain
29
from sphinxcontrib.autohttp.common import http_directive, import_object
30
31
from .flask_base import AutoflaskBase
32
33
class AutoflaskDirective(AutoflaskBase):
34
35
def
run
(self):
36
node = nodes.section()
37
node.document = self.state.document
38
result = ViewList()
39
for
line
in
self.
make_rst
make_rst
():
40
result.append(line,
'<autoflask>'
)
41
nested_parse_with_titles(self.state, result, node)
42
return
node.children
43
44
45
def
setup
(app):
46
if
'http'
not
in
app.domains:
47
httpdomain.setup(app)
48
app.add_directive(
'autoflask'
, AutoflaskDirective)
httpdomain.autohttp.flask.AutoflaskDirective.run
def run(self)
Definition:
flask.py:35
httpdomain.autohttp.flask_base.AutoflaskBase.make_rst
def make_rst(self, qref=False)
Definition:
flask_base.py:163
httpdomain.autohttp.flask.setup
def setup(app)
Definition:
flask.py:45
contrib
handbook
_exts
httpdomain
autohttp
flask.py
Generated by
1.9.4