Skip to content

Commit 425eb4e

Browse files
committed
Add a note about the implementation of helpers._calculate_padding()
1 parent d4dcfae commit 425eb4e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

linodecli/configuration/helpers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ def _default_thing_input(
188188

189189

190190
def _pad_index(idx: int, total: int) -> str:
191+
# NOTE: The implementation of this function could be less opaque if we're
192+
# willing to say, "There will never be a case where total > X, because no
193+
# one could examine and choose from that many options."
191194
max_padding = math.floor(math.log10(total)) + 1
192195
num_spaces = max_padding - math.floor(math.log10(idx))
193196

0 commit comments

Comments
 (0)