diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-05 16:20:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-05 16:20:58 +0000 |
commit | 5bb0bb4be543fd5eca41673696a62ed80d493591 (patch) | |
tree | ad2c464f140e86c7f178a6276d7ea4a93e3e6c92 /doc/development/tutorials/examples/autodoc_intenum.py | |
parent | Adding upstream version 7.2.6. (diff) | |
download | sphinx-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.py | 19 |
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) |