summaryrefslogtreecommitdiffstats
path: root/doc/development/tutorials/examples/autodoc_intenum.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:20:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:20:58 +0000
commit5bb0bb4be543fd5eca41673696a62ed80d493591 (patch)
treead2c464f140e86c7f178a6276d7ea4a93e3e6c92 /doc/development/tutorials/examples/autodoc_intenum.py
parentAdding upstream version 7.2.6. (diff)
downloadsphinx-5bb0bb4be543fd5eca41673696a62ed80d493591.tar.xz
sphinx-5bb0bb4be543fd5eca41673696a62ed80d493591.zip
Adding upstream version 7.3.7.upstream/7.3.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/development/tutorials/examples/autodoc_intenum.py')
-rw-r--r--doc/development/tutorials/examples/autodoc_intenum.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/doc/development/tutorials/examples/autodoc_intenum.py b/doc/development/tutorials/examples/autodoc_intenum.py
index 75fa204..c52bb4c 100644
--- a/doc/development/tutorials/examples/autodoc_intenum.py
+++ b/doc/development/tutorials/examples/autodoc_intenum.py
@@ -19,9 +19,9 @@ class IntEnumDocumenter(ClassDocumenter):
option_spec['hex'] = bool_option
@classmethod
- def can_document_member(cls,
- member: Any, membername: str,
- isattr: bool, parent: Any) -> bool:
+ def can_document_member(
+ cls, member: Any, membername: str, isattr: bool, parent: Any
+ ) -> bool:
try:
return issubclass(member, IntEnum)
except TypeError:
@@ -31,11 +31,11 @@ class IntEnumDocumenter(ClassDocumenter):
super().add_directive_header(sig)
self.add_line(' :final:', self.get_sourcename())
- def add_content(self,
- more_content: StringList | None,
- no_docstring: bool = False,
- ) -> None:
-
+ def add_content(
+ self,
+ more_content: StringList | None,
+ no_docstring: bool = False,
+ ) -> None:
super().add_content(more_content, no_docstring)
source_name = self.get_sourcename()
@@ -48,8 +48,7 @@ class IntEnumDocumenter(ClassDocumenter):
if use_hex:
the_member_value = hex(the_member_value)
- self.add_line(
- f"**{the_member_name}**: {the_member_value}", source_name)
+ self.add_line(f'**{the_member_name}**: {the_member_value}', source_name)
self.add_line('', source_name)