From 7051eba9b9438d63275cf20cea3edeb3182581cc Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Mon, 21 Apr 2025 14:44:04 +0200 Subject: [PATCH] doc(revpiconfig): Add docstrings to enums in `revpi_config.py` This update introduces detailed docstrings for the `ComputeModuleTypes` and `ConfigActions` enumeration classes. The docstrings provide descriptions for each class and their attributes, improving code readability and maintainability. --- .../system_config/revpi_config.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/revpi_middleware/dbus_middleware1/system_config/revpi_config.py b/src/revpi_middleware/dbus_middleware1/system_config/revpi_config.py index c63eec1..e58d9b2 100644 --- a/src/revpi_middleware/dbus_middleware1/system_config/revpi_config.py +++ b/src/revpi_middleware/dbus_middleware1/system_config/revpi_config.py @@ -26,6 +26,21 @@ CONFIG_TXT_LOCATIONS = ("/boot/firmware/config.txt", "/boot/config.txt") class ComputeModuleTypes(IntEnum): + """ + Enumeration class to represent compute module types. + + This class is an enumeration that defines various types of compute + modules and assigns them associated integer values for identifying + different module types. + + Attributes: + UNKNOWN (int): Represents an unknown or undefined compute module type. + CM1 (int): Represents a Compute Module 1. + CM3 (int): Represents a Compute Module 3. + CM4 (int): Represents a Compute Module 4. + CM4S (int): Represents a Compute Module 4S. + CM5 (int): Represents a Compute Module 5. + """ UNKNOWN = 0 CM1 = 6 CM3 = 10 @@ -35,6 +50,13 @@ class ComputeModuleTypes(IntEnum): class ConfigActions(Enum): + """ + Enumeration class for defining configuration actions. + + This enumeration provides predefined constants for common configuration + actions. It can be used to ensure consistency when working with or defining + such actions in a system. + """ ENABLE = "enable" DISABLE = "disable" STATUS = "status"