From cde26b893476c48558fedeb61d728f57f9502f95 Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Tue, 23 Sep 2025 19:49:33 +0200 Subject: [PATCH] Convert string format function calls to f-strings. --- owm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/owm.py b/owm.py index 237c3d7..e538b2b 100755 --- a/owm.py +++ b/owm.py @@ -67,11 +67,11 @@ def write_csv(csv_file, weather_data): weather_data['datetime'].time(), weather_data['sunrise'].time(), weather_data['sunset'].time(), - "{:.2f}".format(weather_data['temp']), - "{:.2f} mm/h".format(weather_data['precipitation']), - "{:.1f} km/h {}".format(weather_data['windspeed'], weather_data['winddirection']), + f"{weather_data['temp']:.2f}", + f"{weather_data['precipitation']:.2f} mm/h", + f"{weather_data['windspeed']:.1f} km/h {weather_data['winddirection']}", weather_data['weather'], - "{}".format(weather_data['cloudiness']) + f"{weather_data['cloudiness']}" ]) -- 2.47.3