Skip to content

Commit 74aa3b9

Browse files
committed
PyLint requirements
1 parent aa96aad commit 74aa3b9

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

IoT_Environment_Sensor/aio.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"""
1414

1515
import time
16+
import gc
1617
import board
1718
import busio
18-
import gc
1919
from digitalio import DigitalInOut
2020
from adafruit_esp32spi import adafruit_esp32spi
2121
import adafruit_esp32spi.adafruit_esp32spi_requests as requests
@@ -66,7 +66,7 @@ def connect(self):
6666
continue
6767

6868
def post(self, feed, payload):
69-
api_url = 'https://io.adafruit.com/api/v2/{0}/feeds/{1}/data'.format(secrets['aio_username'], feed)
69+
api_url = 'https://io.adafruit.com/api/v2/{0}/feeds/{1}/data'.format(secrets['aio_username'], feed)# pylint: disable=line-too-long
7070
logger.info('POSTing to %s', api_url)
7171
logger.info('payload: %s', str(payload))
7272
auth_header = {'X-AIO-KEY':secrets['aio_key']}
@@ -94,6 +94,7 @@ def post(self, feed, payload):
9494
r.close()
9595
return r.status_code == 200
9696

97+
# pylint:disable=too-many-locals
9798
def refresh_local_time(self):
9899
# pylint: disable=line-too-long
99100
"""Fetch and "set" the local time of this microcontroller to the local time at the location, using an internet time API.

IoT_Environment_Sensor/air_quality.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ def read(self):
6767
frame = struct.unpack(">HHHHHHHHHHHHHH", bytes(self._buffer[4:32]))
6868

6969
self._pm10_standard, self._pm25_standard, self._pm100_standard, self._pm10_env, \
70-
self._pm25_env, self._pm100_env, self._particles_03um, self._particles_05um, self._particles_10um, \
71-
self._particles_25um, self._particles_50um, self._particles_100um, skip, checksum = frame
70+
self._pm25_env, self._pm100_env, self._particles_03um, self._particles_05um, \
71+
self._particles_10um, self._particles_25um, self._particles_50um, \
72+
self._particles_100um, _, checksum = frame
7273

7374
check = sum(self._buffer[0:30])
7475

IoT_Environment_Sensor/code.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@
5757

5858
logger.info('Starting reading loop')
5959

60-
payload = {'value' : 0, 'lat' : gps_interface.latitude, 'lon' : gps_interface.longitude, 'created_at' : ''}
60+
payload = {'value' : 0,
61+
'lat' : gps_interface.latitude,
62+
'lon' : gps_interface.longitude,
63+
'created_at' : ''}
6164

6265
while True:
6366
now = time.monotonic()

0 commit comments

Comments
 (0)