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).