Skip to content

Commit d8166ff

Browse files
committed
rename inner for loop vars
1 parent ced0b7a commit d8166ff

File tree

1 file changed

+6
-6
lines changed
  • Feather_RP2040_USB_Host/CircuitPython_GamePad_ReadData

1 file changed

+6
-6
lines changed

Feather_RP2040_USB_Host/CircuitPython_GamePad_ReadData/code.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ def print_array(arr, max_index=None, fmt="hex"):
9090
else:
9191
length = max_index
9292

93-
for i in range(length):
93+
for _ in range(length):
9494
if fmt == "hex":
95-
out_str += f"{int(arr[i]):02x} "
95+
out_str += f"{int(arr[_]):02x} "
9696
elif fmt == "bin":
97-
out_str += f"{int(arr[i]):08b} "
97+
out_str += f"{int(arr[_]):08b} "
9898
print(out_str)
9999

100100

@@ -109,9 +109,9 @@ def reports_equal(report_a, report_b):
109109
if report_a is None and report_b is not None or \
110110
report_b is None and report_a is not None:
111111
return False
112-
for i in range(len(report_a)):
113-
if IGNORE_INDEXES is not None and i not in IGNORE_INDEXES:
114-
if report_a[i] != report_b[i]:
112+
for _ in range(len(report_a)):
113+
if IGNORE_INDEXES is not None and _ not in IGNORE_INDEXES:
114+
if report_a[_] != report_b[_]:
115115
return False
116116
return True
117117

0 commit comments

Comments
 (0)