Skip to content

Commit

Permalink
Merge pull request #26 from adafruit/pylint-fix
Browse files Browse the repository at this point in the history
Fixed linting
  • Loading branch information
tekktrik committed Nov 10, 2022
2 parents a3724d9 + d9f3f20 commit 636106e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions adafruit_bluefruitspi.py
Expand Up @@ -111,7 +111,13 @@ class BluefruitSPI:
"""Helper for the Bluefruit LE SPI Friend"""

def __init__(
self, spi, cs, irq, reset, debug=False, fifo_len=20
self,
spi,
cs, # pylint: disable=invalid-name
irq,
reset,
debug=False,
fifo_len=20,
): # pylint: disable=too-many-arguments
self._irq = irq
self._buf_tx = bytearray(20)
Expand Down Expand Up @@ -376,7 +382,7 @@ def read_packet(self): # pylint: disable=too-many-return-statements
packet = self._buffer[0:plen]

self._buffer = self._buffer[plen:] # remove packet from buffer
if sum([ord(x) for x in packet]) % 256 != 255: # check sum
if sum(ord(x) for x in packet) % 256 != 255: # check sum
return None

# OK packet's good!
Expand Down

0 comments on commit 636106e

Please sign in to comment.