Compare commits

...

4 commits

Author SHA1 Message Date
cd006d3e7c address pylint wrong-import-order diagnostic 2020-08-24 16:01:05 -05:00
6fe1c80520 use raise ... from 2020-08-24 15:52:45 -05:00
f179ce0645 run black 2020-08-23 11:53:46 -05:00
5f81ba51b5 remove bad-whitespace pylint directive 2020-08-23 11:01:51 -05:00
2 changed files with 2 additions and 5 deletions

View file

@ -51,7 +51,6 @@ from digitalio import Direction, Pull
from adafruit_bus_device.spi_device import SPIDevice
from micropython import const
# pylint: disable=bad-whitespace
_MSG_COMMAND = const(0x10) # Command message
_MSG_RESPONSE = const(0x20) # Response message
_MSG_ALERT = const(0x40) # Alert message
@ -84,8 +83,6 @@ _ERROR_UNSUPPORTED = const(0x8063) # AT: Unsupported command
_PACKET_BUTTON_LEN = const(5)
_PACKET_COLOR_LEN = const(6)
# pylint: enable=bad-whitespace
class BluefruitSPI:
"""Helper for the Bluefruit LE SPI Friend"""
@ -250,7 +247,7 @@ class BluefruitSPI:
return rsp
raise RuntimeError("Unknown response (id:{0})".format(hex(msgid)))
except RuntimeError as error:
raise RuntimeError("AT command failure: " + repr(error))
raise RuntimeError("AT command failure: " + repr(error)) from error
def command_check_OK(self, command, delay=0.0): # pylint: disable=invalid-name
"""Send a fully formed bytestring AT command, and check

View file

@ -5,8 +5,8 @@ import time
import busio
import board
from digitalio import DigitalInOut
from adafruit_bluefruitspi import BluefruitSPI
import neopixel
from adafruit_bluefruitspi import BluefruitSPI
ADVERT_NAME = b"BlinkaNeoLamp"