From 6a2499227a3c3910def42fdc14af0591001008bc Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 10:51:53 -0500 Subject: [PATCH] render the board support list within the docs of os.getenv --- shared-bindings/os/__init__.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/shared-bindings/os/__init__.c b/shared-bindings/os/__init__.c index e9e5f0885f..18fec53049 100644 --- a/shared-bindings/os/__init__.c +++ b/shared-bindings/os/__init__.c @@ -41,6 +41,8 @@ //| """functions that an OS normally provides //| //| |see_cpython_module| :mod:`cpython:os`. +//| +//| .. jinja //| """ //| //| import typing @@ -88,7 +90,24 @@ MP_DEFINE_CONST_FUN_OBJ_0(os_getcwd_obj, os_getcwd); //| def getenv(key: str, default: Optional[str] = None) -> Optional[str]: //| """Get the environment variable value for the given key or return ``default``. //| -//| This may load values from disk so cache the result instead of calling this often.""" +//| This may load values from disk so cache the result instead of calling this often. +//| +//| On boards that do not support ``settings.toml`` reading in the core, this function will raise NotImplementedError. +//| +//| .. raw:: html +//| +//|

+//|

+//| Available on these boards +//| +//|
+//|

+//| +//| """ //| ... //| STATIC mp_obj_t os_getenv(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {