Commit 468a2608 authored by jnanar's avatar jnanar

Downgrade strings for python 3.5 (debian)

parent 6b54331d
......@@ -53,9 +53,10 @@ class Weather:
precipitations_1h = parsed_json['rain']['1h']
description = None
msg = f"À {location} : {description}\n\
Température : {today_temp_c}°C, humidité: {relative_humidity}%, vent {wind_direction}° de {wind_speed}km/h\n\
Précipitations dernière heure: {precipitations_1h} mm"
msg = "À {} : {}\n\
Température : {}°C, humidité: {}%, vent {}° de {}km/h\n\
Précipitations dernière heure: {} mm".format(location, description, today_temp_c, relative_humidity,
wind_direction, wind_speed, precipitations_1h)
return msg
def forecast(self):
......@@ -74,7 +75,8 @@ class Weather:
temp_min = d['main']['temp_min']
temp_max = d['main']['temp_max']
humidity = d['main']['humidity']
data['forecast'] = f"{forecast}. Température {temp}° ({temp_min}° à {temp_max}°), {humidity}% humidité,"
data['forecast'] = "{}. Température {}° ({}° à {}°), {}% humidité,".format(
forecast,temp, temp_min, temp_max, humidity)
full_data.append(data)
msg = ''
for d in full_data:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment