Skip to content

Commit 24f3533

Browse files
authored
minor lint tweaks
1 parent ff00022 commit 24f3533

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

PyPortal_MQTT_Control/code.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,15 @@ def set_backlight(val):
9797
# Button Objects
9898
button_1 = Button(x=BUTTON_MARGIN, y=BUTTON_MARGIN,
9999
width=BUTTON_WIDTH, height=BUTTON_HEIGHT,
100-
label="Button 1", label_font=font, style=Button.SHADOWROUNDRECT, label_color=0x505050,
100+
label="Button 1", label_font=font,
101+
style=Button.SHADOWROUNDRECT, label_color=0x505050,
101102
fill_color=0x9e9e9e, outline_color=0x464646)
102103
buttons.append(button_1)
103104

104105
button_2 = Button(x=BUTTON_MARGIN, y=BUTTON_MARGIN*2+BUTTON_HEIGHT,
105106
width=BUTTON_WIDTH, height=BUTTON_HEIGHT,
106-
label="Button 2", label_font=font, style=Button.SHADOWROUNDRECT, label_color=0x505050,
107+
label="Button 2", label_font=font,
108+
style=Button.SHADOWROUNDRECT, label_color=0x505050,
107109
fill_color=0x9e9e9e, outline_color=0x464646)
108110
buttons.append(button_2)
109111

@@ -197,11 +199,11 @@ def message(client, topic, message):
197199

198200
# Set up a MiniMQTT Client
199201
client = MQTT(socket,
200-
broker = secrets['broker'],
201-
port = 1883,
202-
username = secrets['user'],
203-
password = secrets['pass'],
204-
network_manager = wifi)
202+
broker = secrets['broker'],
203+
port = 1883,
204+
username = secrets['user'],
205+
password = secrets['pass'],
206+
network_manager = wifi)
205207

206208
# Connect callback handlers to client
207209
client.on_connect = connect
@@ -276,4 +278,4 @@ def message(client, topic, message):
276278
client.publish(mqtt_temperature, temperature)
277279

278280
print('Sending motion sensor value: %d' % movement_value)
279-
client.publish(mqtt_PIR, '{}'.format(movement_value))
281+
client.publish(mqtt_PIR, '{}'.format(movement_value))

0 commit comments

Comments
 (0)