sphinx-autoapi/autoapi/backends.py

38 lines
950 B
Python
Raw Normal View History

2019-01-27 05:20:45 +00:00
from .mappers import (
DotNetSphinxMapper,
PythonSphinxMapper,
GoSphinxMapper,
JavaScriptSphinxMapper,
)
2015-08-03 20:12:34 +00:00
2019-10-05 22:11:23 +00:00
DEFAULT_FILE_PATTERNS = {
"python": ["*.py", "*.pyi"],
2019-01-27 05:20:45 +00:00
"dotnet": ["project.json", "*.csproj", "*.vbproj"],
"go": ["*.go"],
"javascript": ["*.js"],
2015-08-03 20:12:34 +00:00
}
2016-11-04 20:42:15 +00:00
2019-10-05 22:11:23 +00:00
DEFAULT_IGNORE_PATTERNS = {
2019-01-27 05:20:45 +00:00
"dotnet": ["*toc.yml", "*index.yml"],
"python": ["*migrations*"],
2015-08-03 20:12:34 +00:00
}
2016-11-04 20:42:15 +00:00
2019-10-05 22:11:23 +00:00
LANGUAGE_MAPPERS = {
2019-01-27 05:20:45 +00:00
"python": PythonSphinxMapper,
"dotnet": DotNetSphinxMapper,
"go": GoSphinxMapper,
"javascript": JavaScriptSphinxMapper,
2015-08-03 20:12:34 +00:00
}
#: describes backend requirements in form
#: {'backend name': (('1st package name in pypi', '1st package import name'), ...)}
2019-10-05 22:11:23 +00:00
LANGUAGE_REQUIREMENTS = {
"python": (),
"javascript": (),
"go": (("sphinxcontrib-golangdomain", "sphinxcontrib.golangdomain"),),
"dotnet": (("sphinxcontrib-dotnetdomain", "sphinxcontrib.dotnetdomain"),),
} # type: Dict[str, Sequence[Tuple[str, str]]]