Skip to content

Commit 9a3c69c

Browse files
author
brentru
committed
black!
1 parent 0b1dc38 commit 9a3c69c

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

adafruit_gc_iot_core.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ def __init__(self, mqtt_client):
6666
if "MQTT" in mqtt_client_type:
6767
self._client = mqtt_client
6868
else:
69-
raise TypeError(
70-
"This class requires a MiniMQTT client object, please create one."
71-
)
69+
raise TypeError("This class requires a MiniMQTT client object, please create one.")
7270
# Verify that the MiniMQTT client was setup correctly.
7371
try:
7472
self.user = self._client.user
@@ -326,9 +324,7 @@ def __init__(self, esp, secrets, log=False):
326324
if hasattr(secrets, "keys"):
327325
self._secrets = secrets
328326
else:
329-
raise AttributeError(
330-
"Project settings are kept in secrets.py, please add them there!"
331-
)
327+
raise AttributeError("Project settings are kept in secrets.py, please add them there!")
332328
self.logger = None
333329
if log is True:
334330
self.logger = logging.getLogger("log")
@@ -339,7 +335,7 @@ def __init__(self, esp, secrets, log=False):
339335
self._reg_id = secrets["registry_id"]
340336
self._device_id = secrets["device_id"]
341337
self._private_key = secrets["private_key"]
342-
self.broker = "https://mqtt.googleapis.com"
338+
self.broker = "mqtt.googleapis.com"
343339
self.username = b"unused"
344340
self.cid = self.client_id
345341

examples/gc_iot_core_simpletest.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
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(
36-
board.NEOPIXEL, 1, brightness=0.2
37-
) # Uncomment for Most Boards
35+
status_light = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.2) # Uncomment for Most Boards
3836
"""Uncomment below for ItsyBitsy M4"""
3937
# status_light = dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1, brightness=0.2)
4038
# Uncomment below for an externally defined RGB LED
@@ -105,12 +103,7 @@ def message(client, topic, msg):
105103
# print("Your JWT is: ", jwt)
106104

107105
# Set up a new MiniMQTT Client
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-
)
106+
client = MQTT.MQTT(broker=google_iot.broker, username=google_iot.username, password=secrets["jwt"], client_id=google_iot.cid,)
114107

115108
# Initialize Google MQTT API Client
116109
google_mqtt = MQTT_API(client)

0 commit comments

Comments
 (0)