Fix PEP8 errors in weather module
This commit is contained in:
parent
e2d07f8262
commit
1976a83569
@ -7,6 +7,7 @@ import xml.etree.ElementTree as ElementTree
|
|||||||
|
|
||||||
WEATHER_COM_URL = 'http://wxdata.weather.com/wxdata/weather/local/%s?unit=%s&cc=*'
|
WEATHER_COM_URL = 'http://wxdata.weather.com/wxdata/weather/local/%s?unit=%s&cc=*'
|
||||||
|
|
||||||
|
|
||||||
class Weather(IntervalModule):
|
class Weather(IntervalModule):
|
||||||
"""
|
"""
|
||||||
This module gets the weather from weather.com.
|
This module gets the weather from weather.com.
|
||||||
@ -61,13 +62,16 @@ class Weather(IntervalModule):
|
|||||||
text=doc.findtext('cc/t'),
|
text=doc.findtext('cc/t'),
|
||||||
temperature=doc.findtext('cc/tmp'),
|
temperature=doc.findtext('cc/tmp'),
|
||||||
humidity=doc.findtext('cc/hmid'),
|
humidity=doc.findtext('cc/hmid'),
|
||||||
wind=dict(text=doc.findtext('cc/wind/t'), speed=doc.findtext('cc/wind/s'))
|
wind=dict(
|
||||||
|
text=doc.findtext('cc/wind/t'),
|
||||||
|
speed=doc.findtext('cc/wind/s'),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
units=dict(
|
units=dict(
|
||||||
temperature=doc.findtext('head/ut'),
|
temperature=doc.findtext('head/ut'),
|
||||||
speed=doc.findtext('head/us'),
|
speed=doc.findtext('head/us'),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@require(internet)
|
@require(internet)
|
||||||
def run(self):
|
def run(self):
|
||||||
@ -94,6 +98,6 @@ class Weather(IntervalModule):
|
|||||||
current_temp=current_temp,
|
current_temp=current_temp,
|
||||||
current_wind=current_wind,
|
current_wind=current_wind,
|
||||||
humidity=humidity,
|
humidity=humidity,
|
||||||
),
|
),
|
||||||
"color": color
|
"color": color
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user