Skip to content

Commit 1bcc7f2

Browse files
committed
Linted
1 parent b09486e commit 1bcc7f2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

adafruit_touchscreen.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ def touch_point(self): # pylint: disable=too-many-locals
123123
with AnalogIn(self._xp_pin) as x_p:
124124
y_p.switch_to_output(True)
125125
y_m.switch_to_output(False)
126-
for i in range(len(self._xsamples)):
126+
for i in range( # pylint: disable=consider-using-enumerate
127+
len(self._xsamples)
128+
):
127129
self._xsamples[i] = x_p.value
128130
x = sum(self._xsamples) / len(self._xsamples)
129131
x_size = 65535
@@ -136,7 +138,9 @@ def touch_point(self): # pylint: disable=too-many-locals
136138
with AnalogIn(self._yp_pin) as y_p:
137139
x_p.switch_to_output(True)
138140
x_m.switch_to_output(False)
139-
for i in range(len(self._ysamples)):
141+
for i in range( # pylint: disable=consider-using-enumerate
142+
len(self._ysamples)
143+
):
140144
self._ysamples[i] = y_p.value
141145
y = sum(self._ysamples) / len(self._ysamples)
142146
y_size = 65535

0 commit comments

Comments
 (0)