Skip to content

Commit

Permalink
autodoc_intenum tutorial: Return parallel_read_safe from setup()
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Apr 15, 2024
1 parent 5562e2b commit 60f1a2b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion doc/development/tutorials/examples/autodoc_intenum.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import TYPE_CHECKING, Any

from sphinx.ext.autodoc import ClassDocumenter, bool_option
from sphinx.util.typing import ExtensionMetadata

Check failure on line 7 in doc/development/tutorials/examples/autodoc_intenum.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (TCH001)

doc/development/tutorials/examples/autodoc_intenum.py:7:32: TCH001 Move application import `sphinx.util.typing.ExtensionMetadata` into a type-checking block

if TYPE_CHECKING:
from docutils.statemachine import StringList
Expand Down Expand Up @@ -52,6 +53,10 @@ def add_content(
self.add_line('', source_name)


def setup(app: Sphinx) -> None:
def setup(app: Sphinx) -> ExtensionMetadata:
app.setup_extension('sphinx.ext.autodoc') # Require autodoc extension
app.add_autodocumenter(IntEnumDocumenter)
return {
'version': '0.1',
'parallel_read_safe': True,
}

0 comments on commit 60f1a2b

Please sign in to comment.