From 866a80dbed40dcd295efd4c7f28288b7835c973d Mon Sep 17 00:00:00 2001 From: Gerhard Sittig Date: Sun, 27 May 2018 09:41:19 +0200 Subject: [PATCH] counter: explicit string formatting for annotation text Replace str() conversion with explicit number text formatting, for improved awareness and easier future adjustment during maintenance. --- decoders/counter/pd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/decoders/counter/pd.py b/decoders/counter/pd.py index 4b5085b..905de6e 100644 --- a/decoders/counter/pd.py +++ b/decoders/counter/pd.py @@ -98,8 +98,8 @@ class Decoder(srd.Decoder): continue edge_count += 1 - self.putc(ROW_EDGE, [str(edge_count)]) + self.putc(ROW_EDGE, ["{:d}".format(edge_count)]) if divider and (edge_count % divider) == 0: word_count += 1 - self.putc(ROW_WORD, [str(word_count)]) + self.putc(ROW_WORD, ["{:d}".format(word_count)]) -- 2.30.2