From bc6fc33cda11fb0e17c4d236fa89f43cf808e0a4 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sun, 9 Feb 2025 14:48:01 +0100 Subject: [PATCH] Code formatting --- validate_yaml.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/validate_yaml.py b/validate_yaml.py index f656ea3..09ce218 100755 --- a/validate_yaml.py +++ b/validate_yaml.py @@ -56,7 +56,9 @@ def check_flights(airlines: set[str]) -> None: assert "trip" in booking assert all(flight["airline"] in airlines for flight in booking["flights"]) flight_count += len(booking["flights"]) - co2_flight_count += len([flight for flight in booking["flights"] if "co2_kg" in flight]) + co2_flight_count += len( + [flight for flight in booking["flights"] if "co2_kg" in flight] + ) check_currency(booking) if prev_first_depart: @@ -65,8 +67,10 @@ def check_flights(airlines: set[str]) -> None: ), "Bookings are not in chronological order by first flight's departure." prev_first_depart = booking["flights"][0]["depart"] - print(f"{len(bookings)} flight bookings, {flight_count} flights, " - f"{co2_flight_count} with CO2 numbers") + print( + f"{len(bookings)} flight bookings, {flight_count} flights, " + f"{co2_flight_count} with CO2 numbers" + ) def check_trains() -> None: