Skip to content

Commit e9ebf84

Browse files
committed
Incorporate pylint feedback
1 parent 110e6f8 commit e9ebf84

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

PyPortal_UV_Index/code.py

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

1515
import time
16-
import board
1716
import json
17+
import board
1818
import displayio
1919
from adafruit_pyportal import PyPortal
2020
from adafruit_display_shapes.rect import Rect
@@ -50,7 +50,9 @@ def halt_and_catch_fire(message, *args):
5050
while True:
5151
pass
5252

53+
#pylint:disable=line-too-long
5354
url = 'https://enviro.epa.gov/enviro/efservice/getEnvirofactsUVHOURLY/ZIP/{0}/JSON'.format(secrets['zip'])
55+
#pylint:enable=line-too-long
5456

5557
def extract_hour(date_time):
5658
split_date_time = date_time.split()
@@ -81,8 +83,8 @@ def extract_date(date_time):
8183
while True:
8284
raw_data = json.loads(pyportal.fetch())
8385
data = [{'hour': extract_hour(d['DATE_TIME']), 'value': int(d['UV_VALUE'])}
84-
for d in raw_data
85-
if d['UV_VALUE'] > 0]
86+
for d in raw_data
87+
if d['UV_VALUE'] > 0]
8688
the_day = raw_data[0]['DATE_TIME']
8789
pyportal.set_caption('UV Index for {0}'.format(extract_date(the_day)),
8890
(80, 20),

0 commit comments

Comments
 (0)