|
28 | 28 | # ones. |
29 | 29 | extensions = [ |
30 | 30 | "myst_parser", |
31 | | - "sphinx.ext.autodoc", |
| 31 | + "autodoc2", |
32 | 32 | "sphinx.ext.intersphinx", |
33 | 33 | "sphinx.ext.viewcode", |
| 34 | + "sphinx.ext.autodoc", |
34 | 35 | "sphinx_design", |
35 | 36 | "sphinxext.rediraffe", |
36 | 37 | "sphinxcontrib.mermaid", |
|
57 | 58 |
|
58 | 59 | # -- Autodoc settings --------------------------------------------------- |
59 | 60 |
|
60 | | -autodoc_member_order = "bysource" |
| 61 | +autodoc2_packages = ["../myst_parser"] |
| 62 | +autodoc2_hidden_objects = ["dunder", "private", "inherited"] |
| 63 | +autodoc2_replace_annotations = [ |
| 64 | + ("re.Pattern", "typing.Pattern"), |
| 65 | + ("markdown_it.MarkdownIt", "markdown_it.main.MarkdownIt"), |
| 66 | +] |
| 67 | +autodoc2_replace_bases = [ |
| 68 | + ("myst_parser._compat.Protocol", "typing.Protocol"), |
| 69 | + ("myst_parser._compat.TypedDict", "typing.TypedDict"), |
| 70 | + ("sphinx.directives.SphinxDirective", "sphinx.util.docutils.SphinxDirective"), |
| 71 | +] |
61 | 72 | nitpicky = True |
| 73 | +nitpick_ignore_regex = [ |
| 74 | + (r"py:.*", r"docutils\..*"), |
| 75 | +] |
62 | 76 | nitpick_ignore = [ |
63 | | - ("py:class", "docutils.nodes.document"), |
64 | | - ("py:class", "docutils.nodes.docinfo"), |
65 | | - ("py:class", "docutils.nodes.Element"), |
66 | | - ("py:class", "docutils.nodes.Node"), |
67 | | - ("py:class", "docutils.nodes.field_list"), |
68 | | - ("py:class", "docutils.nodes.problematic"), |
69 | | - ("py:class", "docutils.nodes.pending"), |
70 | | - ("py:class", "docutils.nodes.system_message"), |
71 | | - ("py:class", "docutils.statemachine.StringList"), |
72 | | - ("py:class", "docutils.parsers.rst.directives.misc.Include"), |
73 | | - ("py:class", "docutils.parsers.rst.Parser"), |
74 | | - ("py:class", "docutils.utils.Reporter"), |
75 | | - ("py:class", "nodes.Element"), |
76 | | - ("py:class", "nodes.Node"), |
77 | | - ("py:class", "nodes.system_message"), |
78 | | - ("py:class", "Directive"), |
79 | | - ("py:class", "Include"), |
80 | | - ("py:class", "StringList"), |
81 | | - ("py:class", "DocutilsRenderer"), |
82 | | - ("py:class", "MockStateMachine"), |
| 77 | + ("py:obj", "myst_parser._docs._ConfigBase"), |
83 | 78 | ("py:exc", "MarkupError"), |
| 79 | + ("py:class", "sphinx.util.typing.Inventory"), |
| 80 | + ("py:class", "sphinx.writers.html.HTMLTranslator"), |
| 81 | + ("py:obj", "sphinx.transforms.post_transforms.ReferencesResolver"), |
84 | 82 | ] |
85 | 83 |
|
86 | 84 | # -- MyST settings --------------------------------------------------- |
|
166 | 164 | "sphinx/intro.md": "intro.md", |
167 | 165 | "using/use_api.md": "api/index.md", |
168 | 166 | "api/index.md": "api/reference.rst", |
| 167 | + "api/reference.rst": "apidocs/index.md", |
169 | 168 | "using/syntax.md": "syntax/syntax.md", |
170 | 169 | "using/syntax-optional.md": "syntax/optional.md", |
171 | 170 | "using/reference.md": "syntax/reference.md", |
|
0 commit comments