Code formatting

This commit is contained in:
Edward Betts 2025-02-09 14:48:01 +01:00
parent 938d8a5afe
commit bc6fc33cda

View file

@ -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: