From: Philipp Spitzer Date: Tue, 23 Sep 2025 17:49:33 +0000 (+0200) Subject: Convert string format function calls to f-strings. X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/commitdiff_plain/cde26b893476c48558fedeb61d728f57f9502f95?ds=sidebyside Convert string format function calls to f-strings. --- 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']}" ])