Skip to content

Commit 322fd74

Browse files
committed
pylint fix
1 parent 1565c98 commit 322fd74

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

adafruit_rfm9x.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ def __init__(self, spi, cs, reset, frequency, *, preamble_length=8,
363363
# No device type check! Catch an error from the very first request and
364364
# throw a nicer message to indicate possible wiring problems.
365365
version = self._read_u8(_RH_RF95_REG_42_VERSION)
366-
if (version != 18):
367-
raise RuntimeError('failed to find rfm9x with expected version -- check wiring')
366+
if version != 18:
367+
raise RuntimeError('Failed to find rfm9x with expected version -- check wiring')
368368

369369
# Set sleep mode, wait 10s and confirm in sleep mode (basic device check).
370370
# Also set long range mode (LoRa mode) as it can only be done in sleep.
@@ -497,8 +497,8 @@ def frequency_mhz(self):
497497

498498
@frequency_mhz.setter
499499
def frequency_mhz(self, val):
500-
if (val < 240 or val > 960):
501-
raise RuntimeError("Frequency must be between 240 and 960")
500+
if val < 240 or val > 960:
501+
raise RuntimeError('frequency_mhz must be between 240 and 960')
502502
# Calculate FRF register 24-bit value.
503503
frf = int((val * 1000000.0) / _RH_RF95_FSTEP) & 0xFFFFFF
504504
# Extract byte values and update registers.
@@ -529,7 +529,7 @@ def tx_power(self, val):
529529
val = int(val)
530530
if self.high_power:
531531
if val < 5 or val > 23:
532-
raise RuntimeError("tx_power must be between 5 and 23")
532+
raise RuntimeError('tx_power must be between 5 and 23')
533533
# Enable power amp DAC if power is above 20 dB.
534534
# Lower setting by 3db when PA_BOOST enabled - see Data Sheet Section 6.4
535535
if val > 20:

0 commit comments

Comments
 (0)