Skip to content

Commit 6dba7bf

Browse files
author
brentru
committed
black2
1 parent 9a3c69c commit 6dba7bf

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

adafruit_gc_iot_core.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ def __init__(self, mqtt_client):
6666
if "MQTT" in mqtt_client_type:
6767
self._client = mqtt_client
6868
else:
69-
raise TypeError("This class requires a MiniMQTT client object, please create one.")
69+
raise TypeError(
70+
"This class requires a MiniMQTT client object, please create one."
71+
)
7072
# Verify that the MiniMQTT client was setup correctly.
7173
try:
7274
self.user = self._client.user
@@ -324,7 +326,9 @@ def __init__(self, esp, secrets, log=False):
324326
if hasattr(secrets, "keys"):
325327
self._secrets = secrets
326328
else:
327-
raise AttributeError("Project settings are kept in secrets.py, please add them there!")
329+
raise AttributeError(
330+
"Project settings are kept in secrets.py, please add them there!"
331+
)
328332
self.logger = None
329333
if log is True:
330334
self.logger = logging.getLogger("log")

examples/gc_iot_core_simpletest.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
3333
esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset)
3434
"""Use below for Most Boards"""
35-
status_light = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.2) # Uncomment for Most Boards
35+
status_light = neopixel.NeoPixel(
36+
board.NEOPIXEL, 1, brightness=0.2
37+
) # Uncomment for Most Boards
3638
"""Uncomment below for ItsyBitsy M4"""
3739
# status_light = dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1, brightness=0.2)
3840
# Uncomment below for an externally defined RGB LED
@@ -103,7 +105,12 @@ def message(client, topic, msg):
103105
# print("Your JWT is: ", jwt)
104106

105107
# Set up a new MiniMQTT Client
106-
client = MQTT.MQTT(broker=google_iot.broker, username=google_iot.username, password=secrets["jwt"], client_id=google_iot.cid,)
108+
client = MQTT.MQTT(
109+
broker=google_iot.broker,
110+
username=google_iot.username,
111+
password=secrets["jwt"],
112+
client_id=google_iot.cid,
113+
)
107114

108115
# Initialize Google MQTT API Client
109116
google_mqtt = MQTT_API(client)

0 commit comments

Comments
 (0)