clean up clean up
This commit is contained in:
parent
d8c3dd00e2
commit
ad3ebc5a7c
@ -24,6 +24,8 @@ def get_weather(message):
|
|||||||
get_weather(location)
|
get_weather(location)
|
||||||
|
|
||||||
Returns the weather forecast for the selected location. Uses PythonOWM.
|
Returns the weather forecast for the selected location. Uses PythonOWM.
|
||||||
|
|
||||||
|
TODO: Create a list of weather preferences - rain > sun, snow > rain, etc.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
forecaster = openweathermap.three_hours_forecast(message)
|
forecaster = openweathermap.three_hours_forecast(message)
|
||||||
@ -53,7 +55,7 @@ def get_weather(message):
|
|||||||
temps = day.get_temperature('fahrenheit')
|
temps = day.get_temperature('fahrenheit')
|
||||||
h = temps.get('temp_max')
|
h = temps.get('temp_max')
|
||||||
l = temps.get('temp_min')
|
l = temps.get('temp_min')
|
||||||
print(forecast.get(i + j).get_detailed_status())
|
# print(forecast.get(i + j).get_detailed_status())
|
||||||
if high < h:
|
if high < h:
|
||||||
high = h
|
high = h
|
||||||
if low > l:
|
if low > l:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user