Skip to content

Commit 28a84fa

Browse files
committed
the linter soldier
1 parent ebd72cb commit 28a84fa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

adafruit_mpr121.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
# pylint: enable=bad-whitespace
8181

8282
class MPR121_Channel():
83+
# pylint: disable=protected-access
8384
"""Helper class to represent a touch channel on the MPR121. Not meant to
8485
be used directly."""
8586
def __init__(self, mpr121, channel):
@@ -107,7 +108,7 @@ def thresholds(self):
107108
def thresholds(self, value):
108109
touch, release = value
109110
self._mpr121._write_register_byte(MPR121_TOUCHTH_0 + 2*self._channel, touch)
110-
self._mpr121._write_register_byte(MPR121_RELEASETH_0 + 2*self._channel, release)
111+
self._mpr121._write_register_byte(MPR121_RELEASETH_0 + 2*self._channel, release)
111112

112113
class MPR121:
113114
"""Driver for the MPR121 capacitive touch breakout board."""
@@ -136,13 +137,13 @@ def thresholds(self):
136137
"""The touch / release threholds for all channels."""
137138
buf = bytearray(24)
138139
self._read_register_bytes(MPR121_TOUCHTH_0, buf, 24)
139-
return tuple( [ (buf[2*i], buf[2*i+1]) for i in range(12) ] )
140+
return tuple([(buf[2*i], buf[2*i+1]) for i in range(12)])
140141

141142
@thresholds.setter
142143
def thresholds(self, value):
143144
touch, release = value
144145
self.set_thresholds(touch, release)
145-
146+
146147
def _write_register_byte(self, register, value):
147148
# Write a byte value to the specifier register address.
148149
# MPR121 must be put in Stop Mode to write to most registers

0 commit comments

Comments
 (0)