From 3d5ad7a303465f3653fd8eba960a07d0c6cabe51 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Mon, 3 Feb 2025 14:04:50 +0100 Subject: [PATCH] Fix formatting of lib/weather_data.py --- lib/weather_data.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/weather_data.py b/lib/weather_data.py index 5343425..0c788c1 100644 --- a/lib/weather_data.py +++ b/lib/weather_data.py @@ -6,15 +6,18 @@ import json import requests from globals import WWO_KEY + def get_weather_data(location, lang): """ Get weather data for `location` """ key = WWO_KEY - url = ('/premium/v1/weather.ashx' - '?key=%s&q=%s&format=json' - '&num_of_days=3&tp=3&lang=%s') % (key, location, lang) - url = 'http://127.0.0.1:5001' + url + url = ( + "/premium/v1/weather.ashx" + "?key=%s&q=%s&format=json" + "&num_of_days=3&tp=3&lang=%s" + ) % (key, location, lang) + url = "http://127.0.0.1:5001" + url response = requests.get(url, timeout=10) try: