From d5e1a2ed45987e6ecf62057a41cc4794b5d601d6 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sun, 6 Oct 2019 10:44:21 -0500 Subject: [PATCH] actually use an f-string when querying wttr.in --- weather/lib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weather/lib.py b/weather/lib.py index 18748bb..6b6611f 100644 --- a/weather/lib.py +++ b/weather/lib.py @@ -8,8 +8,8 @@ logger = logging.getLogger(__name__) def query_wttr_in(query): """Hit the wttr.in JSON API with the provided query.""" - logger.info(f"about to query wttr.in with '{query}") - response = requests.get('http://wttr.in/{query}?format=j1') + logger.info(f"about to query wttr.in with '{query}'") + response = requests.get(f'http://wttr.in/{query}?format=j1') response.raise_for_status() weather_info = response.json() @@ -19,7 +19,7 @@ def query_wttr_in(query): def weather_summary(query): """Create a more consumable version of the weather report.""" - logger.info(f"assembling weather summary for '{query}") + logger.info(f"assembling weather summary for '{query}'") weather_info = query_wttr_in(query) # get some common/nested stuff once now