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: