[elbe-devel] [PATCH] elbevalidate: document some implicit members
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Fri Jun 21 09:50:10 CEST 2024
The members inherited from collections.abc.Sequence are not documented
by autodoc. Use '.. describe::' to document them explicitly.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbevalidate/__init__.py | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/elbevalidate/__init__.py b/elbevalidate/__init__.py
index 6e26d65ab695..22e85bb7990b 100644
--- a/elbevalidate/__init__.py
+++ b/elbevalidate/__init__.py
@@ -112,7 +112,22 @@ class Partition(BlockDevice):
@dataclasses.dataclass
class PartitionTable(collections.abc.Sequence):
- """ List of :py:class:`Partition` inside an :py:class:`Image`. """
+ """
+
+ List of :py:class:`Partition` inside an :py:class:`Image`.
+
+ .. describe:: len(table)
+
+ Number of partitions.
+
+ .. describe:: table[index]
+
+ Partition at index.
+
+ .. describe:: partition in table
+
+ Iterate over partitions.
+ """
label: PartitionLabel
""" Type of the partition table. """
---
base-commit: 6706783bfad7009801bfd404e7884651d00caab2
change-id: 20240621-elbevalidate-partitiontable-51d61dfdacf3
Best regards,
--
Thomas Weißschuh <thomas.weissschuh at linutronix.de>
More information about the elbe-devel
mailing list