Skip to content

Commit 88569bb

Browse files
committed
Making pylint really happy
1 parent c841a69 commit 88569bb

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

adafruit_dht.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,15 @@ class DHTBase:
5555

5656
__hiLevel = 51
5757

58-
def __init__(self, dht11: bool, pin: Pin, trig_wait: int, use_pulseio: bool, *, max_pulses: int = 81):
58+
def __init__(
59+
self,
60+
dht11: bool,
61+
pin: Pin,
62+
trig_wait: int,
63+
use_pulseio: bool,
64+
*,
65+
max_pulses: int = 81
66+
):
5967
"""
6068
:param boolean dht11: True if device is DHT11, otherwise DHT22.
6169
:param ~board.Pin pin: digital pin used for communication
@@ -284,7 +292,7 @@ class DHT11(DHTBase):
284292
"""
285293

286294
def __init__(self, pin: Pin, use_pulseio: bool = _USE_PULSEIO):
287-
super().__init__(True, pin, 18000, 81, use_pulseio)
295+
super().__init__(True, pin, 18000, use_pulseio)
288296

289297

290298
class DHT22(DHTBase):
@@ -294,7 +302,7 @@ class DHT22(DHTBase):
294302
"""
295303

296304
def __init__(self, pin: Pin, use_pulseio: bool = _USE_PULSEIO):
297-
super().__init__(False, pin, 1000, 81, use_pulseio)
305+
super().__init__(False, pin, 1000, use_pulseio)
298306

299307

300308
class DHT21(DHTBase):
@@ -308,4 +316,4 @@ class DHT21(DHTBase):
308316
# If that would be 81, the dummy pulses will be read and the real data would be truncated.
309317
# Hence setting maxPulses to 129, taking both real data and dummy bytes into buffer.
310318
def __init__(self, pin: Pin, use_pulseio: bool = _USE_PULSEIO):
311-
super().__init__(False, pin, 1000, 129, use_pulseio)
319+
super().__init__(False, pin, 1000, use_pulseio, max_pulses=129)

0 commit comments

Comments
 (0)