Skip to content

Commit 9efc83b

Browse files
committed
fix lin errors
1 parent 5901e60 commit 9efc83b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

adafruit_mcp2515/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ def __init__(
255255
:param ~digitalio.DigitalInOut cs_pin: SPI bus enable pin
256256
:param int baudrate: The bit rate of the bus in Hz, using a 16Mhz crystal. All devices on\
257257
the bus must agree on this value. Defaults to 250000.
258-
:param bool xtal_frequency: MCP2515 crystal frequency. Valid values are: 16000000 and 8000000. Defaults to 16000000 (16MHz).\
258+
:param bool xtal_frequency: MCP2515 crystal frequency. Valid values are:\
259+
16000000 and 8000000. Defaults to 16000000 (16MHz).\
259260
:param bool loopback: Receive only packets sent from this device, and send only to this\
260261
device. Requires that `silent` is also set to `True`, but only prevents transmission to\
261262
other devices. Otherwise the send/receive behavior is normal.
@@ -633,7 +634,7 @@ def _get_tx_buffer(self):
633634

634635
def _set_baud_rate(self):
635636
# ******* set baud rate ***********
636-
if self._xtal_frequency != 16000000 and self._xtal_frequency != 8000000:
637+
if self._xtal_frequency not in (16000000, 8000000):
637638
raise RuntimeError("Incorrect xtal frequency")
638639

639640
cnf1, cnf2, cnf3 = _BAUD_RATES[self._xtal_frequency][self.baudrate]

0 commit comments

Comments
 (0)