Code formatting
This commit is contained in:
parent
938d8a5afe
commit
bc6fc33cda
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue