File: __init__.py

package info (click to toggle)
python-sphinxcontrib-django 2.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 608 kB
  • sloc: python: 1,448; makefile: 20; sh: 6
file content (30 lines) | stat: -rw-r--r-- 693 bytes parent folder | download
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
"""
This is a sphinx extension which improves the documentation of Django apps.
"""

from __future__ import annotations

__version__ = "2.5"

from sphinx.application import Sphinx

from . import docstrings, roles


def setup(app: Sphinx) -> dict:
    """
    Allow this module to be used as sphinx extension.

    Setup the two sub-extensions :mod:`~sphinxcontrib_django.docstrings` and
    :mod:`~sphinxcontrib_django.roles` which can also be imported separately.

    :param app: The Sphinx application object
    """
    docstrings.setup(app)
    roles.setup(app)

    return {
        "version:": __version__,
        "parallel_read_safe": True,
        "parallel_write_safe": True,
    }