diff mbox series

[09/13] lib/oe/lsb: improve docstrings

Message ID 20261116-oe-lib-docstrings-v1-9-0c894f6a1064@bootlin.com
State New
Headers show
Series Improve or add oe.* library docstrings | expand

Commit Message

Antonin Godard Nov. 16, 2026, 4:09 p.m. UTC
Improve docstrings by detailing the parameters and return values of
functions in this module.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 meta/lib/oe/lsb.py | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index 1283cefaaf..8f43301484 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -7,7 +7,13 @@ 
 import os
 
 def get_os_release():
-    """Get all key-value pairs from /etc/os-release as a dict"""
+    """
+    Get all key-value pairs from the :term:`Build Host`'s ``/etc/os-release``
+    as a dictionary.
+
+    Return a Python dictionary mapping keys from ``/etc/os-release`` to their
+    values.
+    """
 
     data = {}
     if os.path.exists('/etc/os-release'):
@@ -21,8 +27,14 @@  def get_os_release():
     return data
 
 def distro_identifier(d=None):
-    """Return a distro identifier string based upon /etc/os-release
-       with optional adjustment via a hook"""
+    """
+    Return a distro identifier string based upon the :term:`Build Host`'s /etc/os-release
+    with optional adjustment via a hook defined by ``LSB_DISTRO_ADJUST``.
+    See the value of :term:`SANITY_TESTED_DISTROS` for a list of valid distro identifiers.
+
+    Can optionally take ``d`` (the :term:`datastore`) to read the value of
+    ``LSB_DISTRO_ADJUST``.
+    """
 
     import re