From d91318107931d58476e2c6424ef2a1575e4fcbf7 Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 29 Sep 2023 12:25:58 +0200 Subject: [PATCH] docs(core): add docstrings to modtrezorutils constants [no changelog] --- core/embed/extmod/modtrezorutils/modtrezorutils.c | 13 +++++++++++++ core/mocks/generated/trezorutils.pyi | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/core/embed/extmod/modtrezorutils/modtrezorutils.c b/core/embed/extmod/modtrezorutils/modtrezorutils.c index 7a2ce689f9..c9c61cad10 100644 --- a/core/embed/extmod/modtrezorutils/modtrezorutils.c +++ b/core/embed/extmod/modtrezorutils/modtrezorutils.c @@ -288,18 +288,31 @@ STATIC mp_obj_str_t mod_trezorutils_full_name_obj = { (const byte *)MODEL_FULL_NAME}; /// SCM_REVISION: bytes +/// """Git commit hash of the firmware.""" /// VERSION_MAJOR: int +/// """Major version.""" /// VERSION_MINOR: int +/// """Minor version.""" /// VERSION_PATCH: int +/// """Patch version.""" /// USE_SD_CARD: bool +/// """Whether the hardware supports SD card.""" /// USE_BACKLIGHT: bool +/// """Whether the hardware supports backlight brightness control.""" /// USE_OPTIGA: bool +/// """Whether the hardware supports Optiga secure element.""" /// MODEL: str +/// """Model name.""" /// MODEL_FULL_NAME: str +/// """Full name including Trezor prefix.""" /// INTERNAL_MODEL: str +/// """Internal model code.""" /// EMULATOR: bool +/// """Whether the firmware is running in the emulator.""" /// BITCOIN_ONLY: bool +/// """Whether the firmware is Bitcoin-only.""" /// UI_LAYOUT: str +/// """UI layout identifier ("tt" for model T, "tr" for models One and R).""" STATIC const mp_rom_map_elem_t mp_module_trezorutils_globals_table[] = { {MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_trezorutils)}, diff --git a/core/mocks/generated/trezorutils.pyi b/core/mocks/generated/trezorutils.pyi index d7f1898866..ff2fa9dcc0 100644 --- a/core/mocks/generated/trezorutils.pyi +++ b/core/mocks/generated/trezorutils.pyi @@ -88,14 +88,28 @@ def bootloader_locked() -> bool | None: the feature is not supported. """ SCM_REVISION: bytes +"""Git commit hash of the firmware.""" VERSION_MAJOR: int +"""Major version.""" VERSION_MINOR: int +"""Minor version.""" VERSION_PATCH: int +"""Patch version.""" USE_SD_CARD: bool +"""Whether the hardware supports SD card.""" USE_BACKLIGHT: bool +"""Whether the hardware supports backlight brightness control.""" USE_OPTIGA: bool +"""Whether the hardware supports Optiga secure element.""" MODEL: str +"""Model name.""" +MODEL_FULL_NAME: str +"""Full name including Trezor prefix.""" INTERNAL_MODEL: str +"""Internal model code.""" EMULATOR: bool +"""Whether the firmware is running in the emulator.""" BITCOIN_ONLY: bool +"""Whether the firmware is Bitcoin-only.""" UI_LAYOUT: str +"""UI layout identifier ("tt" for model T, "tr" for models One and R)."""