From 643099b8583b14192f9bceee1d27220cfb0b4591 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 22 Jan 2021 16:43:54 +1000 Subject: [PATCH] Fix flake8 errors - ambiguous variable name 'l' Signed-off-by: Peter Hutterer --- tuhi/util.py | 6 +++--- tuhi/wacom.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tuhi/util.py b/tuhi/util.py index 766d2cd..79fe599 100644 --- a/tuhi/util.py +++ b/tuhi/util.py @@ -12,13 +12,13 @@ # -def list2hex(l, groupsize=8): +def list2hex(lst, groupsize=8): '''Converts a list of integers to a two-letter hex string in the form "1a 2b c3"''' slices = [] - for idx in range(0, len(l), groupsize): - s = ' '.join([f'{x:02x}' for x in l[idx:idx + groupsize]]) + for idx in range(0, len(lst), groupsize): + s = ' '.join([f'{x:02x}' for x in lst[idx:idx + groupsize]]) slices.append(s) return ' '.join(slices) diff --git a/tuhi/wacom.py b/tuhi/wacom.py index e2da4f1..348f44d 100644 --- a/tuhi/wacom.py +++ b/tuhi/wacom.py @@ -113,10 +113,10 @@ def b2hex(bs): return ' '.join([''.join(s) for s in zip(hx[::2], hx[1::2])]) -def list2hexlist(l): +def list2hexlist(lst): '''Converts a list of integers to a two-letter prefixed hex string in the form "[0x1a, 0x32, 0xab]"''' - return '[' + ', '.join([f'{x:#04x}' for x in l]) + ']' + return '[' + ', '.join([f'{x:#04x}' for x in lst]) + ']' class DataLogger(object):