autodoc2.config¶

The configuration for the extension.

Module Contents¶

Classes¶

PackageConfig

A package-level config item.

Config

The configuration for autoapi.

Functions¶

_coerce_packages

Coerce the packages config option to a set.

_validate_replace_list

Validate that an item is a list of tuples.

_validate_hidden_objects

Validate that the hidden objects config option is a set.

_validate_regex_list

Validate that an item is a list of regexes.

_validate_list_tuple_regex_str

Validate that an item is a list of (regex, str) tuples.

_load_renderer

Load a renderer class.

_load_regex_renderers

Load a list of (regex, renderer).

Data¶

API¶

exception autodoc2.config.ValidationError[source]¶

Bases: Exception

An error validating a config value.

Initialization

Initialize self. See help(type(self)) for accurate signature.

autodoc2.config.CONFIG_PREFIX = 'autodoc2_'¶
class autodoc2.config.PackageConfig[source]¶

A package-level config item.

path: str = 'field(...)'¶
from_git_clone: tuple[str, str] | None = 'field(...)'¶
module: str | None = 'field(...)'¶
exclude_dirs: list[str] = 'field(...)'¶
exclude_files: list[str] = 'field(...)'¶
auto_mode: bool = 'field(...)'¶
as_triple() Iterable[tuple[str, Any, dataclasses.Field]][source]¶

Yield triples of (name, value, field).

autodoc2.config._coerce_packages(name: str, item: Any) list[autodoc2.config.PackageConfig][source]¶

Coerce the packages config option to a set.

autodoc2.config._validate_replace_list(name: str, item: Any) list[tuple[str, str]][source]¶

Validate that an item is a list of tuples.

autodoc2.config._validate_hidden_objects(name: str, item: Any) set[str][source]¶

Validate that the hidden objects config option is a set.

autodoc2.config._validate_regex_list(name: str, item: Any) list[Pattern[str]][source]¶

Validate that an item is a list of regexes.

autodoc2.config._validate_list_tuple_regex_str(name: str, item: Any) list[tuple[Pattern[str], str]][source]¶

Validate that an item is a list of (regex, str) tuples.

autodoc2.config._load_renderer(name: str, item: Any) type[autodoc2.render.base.RendererBase][source]¶

Load a renderer class.

autodoc2.config._load_regex_renderers(name: str, item: Any) list[tuple[Pattern[str], type[autodoc2.render.base.RendererBase]]][source]¶

Load a list of (regex, renderer).

class autodoc2.config.Config[source]¶

The configuration for autoapi.

packages: list[autodoc2.config.PackageConfig] = 'field(...)'¶
output_dir: str = 'field(...)'¶
render_plugin: type[autodoc2.render.base.RendererBase] = 'field(...)'¶
render_plugin_regexes: list[tuple[Pattern[str], type[autodoc2.render.base.RendererBase]]] = 'field(...)'¶
module_all_regexes: list[Pattern[str]] = 'field(...)'¶
skip_module_regexes: list[Pattern[str]] = 'field(...)'¶
hidden_objects: set[Literal[undoc, dunder, private, inherited]] = 'field(...)'¶
hidden_regexes: list[Pattern[str]] = 'field(...)'¶
no_index: bool = 'field(...)'¶
deprecated_module_regexes: list[Pattern[str]] = 'field(...)'¶
module_summary: bool = 'field(...)'¶
docstring_parser_regexes: list[tuple[Pattern[str], str]] = 'field(...)'¶
class_docstring: Literal[merge, both] = 'field(...)'¶
class_inheritance: bool = 'field(...)'¶
annotations: bool = 'field(...)'¶
docstrings: Literal[all, direct, none] = 'field(...)'¶
sort_names: bool = 'field(...)'¶
replace_annotations: list[tuple[str, str]] = 'field(...)'¶
replace_bases: list[tuple[str, str]] = 'field(...)'¶
index_template: str | None = 'field(...)'¶
as_triple() Iterable[tuple[str, Any, dataclasses.Field]][source]¶

Yield triples of (name, value, field).