From 7f6cc74f6cd5efa61dd9f8893844c52711923719 Mon Sep 17 00:00:00 2001 From: qlrd Date: Sun, 7 Jan 2024 18:53:50 -0300 Subject: [PATCH] added a :param docstring to src/krux/format.py added a docstring to tests/test_format.py --- src/krux/format.py | 5 ++++- tests/test_format.py | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/krux/format.py b/src/krux/format.py index 9ccc48465..173082573 100644 --- a/src/krux/format.py +++ b/src/krux/format.py @@ -27,9 +27,12 @@ def format_btc(amount): - """Formats a BTC value according to the locale and + """ + Formats a BTC value according to the locale and the International Bureau of Weights and Measures, while still using the idea behind the Satcomma standard + + :param amount: int """ btc_without_decimal = amount // SATS_PER_BTC diff --git a/tests/test_format.py b/tests/test_format.py index e9250d504..86fcbd5ff 100644 --- a/tests/test_format.py +++ b/tests/test_format.py @@ -1,4 +1,11 @@ +# pylint: disable=unused-argument def test_format_btc(m5stickv): + """ + Test many cases where the format of a BTC value + can be shown on device according :function:`krux.format.format_btc` + + :param m5stickv: the device + """ from krux.format import format_btc cases = [