Skip to content

Commit 47089ae

Browse files
committed
Linting fixes
1 parent 582c775 commit 47089ae

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

examples/luftdaten.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def send_to_luftdaten(values, id):
127127

128128
resp_pm = None
129129
resp_bmp = None
130-
130+
131131
try:
132132
resp_pm = requests.post(
133133
"https://api.luftdaten.info/v1/push-sensor-data/",
@@ -150,7 +150,7 @@ def send_to_luftdaten(values, id):
150150
except requests.exceptions.RequestException as e:
151151
logging.warning('Luftdaten PM Request Error: {}'.format(e))
152152

153-
try:
153+
try:
154154
resp_bmp = requests.post(
155155
"https://api.luftdaten.info/v1/push-sensor-data/",
156156
json={

examples/mqtt-all.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#!/usr/bin/env python3
12
"""
23
Run mqtt broker on localhost: sudo apt-get install mosquitto mosquitto-clients
34
45
Example run: python3 mqtt-all.py --broker 192.168.1.164 --topic enviro --username xxx --password xxxx
56
"""
6-
#!/usr/bin/env python3
77

88
import argparse
99
import ST7735
@@ -43,6 +43,7 @@
4343
DEFAULT_USERNAME = None
4444
DEFAULT_PASSWORD = None
4545

46+
4647
# mqtt callbacks
4748
def on_connect(client, userdata, flags, rc):
4849
if rc == 0:
@@ -99,7 +100,7 @@ def get_cpu_temperature():
99100
["vcgencmd", "measure_temp"], stdout=PIPE, universal_newlines=True
100101
)
101102
output, _error = process.communicate()
102-
return float(output[output.index("=") + 1 : output.rindex("'")])
103+
return float(output[output.index("=") + 1:output.rindex("'")])
103104

104105

105106
# Get Raspberry Pi serial number to use as ID
@@ -240,7 +241,7 @@ def main():
240241
HAS_PMS = False
241242
try:
242243
pms5003 = PMS5003()
243-
pm_values = pms5003.read()
244+
_ = pms5003.read()
244245
HAS_PMS = True
245246
print("PMS5003 sensor is connected")
246247
except SerialTimeoutError:

0 commit comments

Comments
 (0)