Skip to content

Commit

Permalink
fixup: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rudiejd committed Mar 30, 2024
1 parent 4b6d385 commit 4a02e92
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion server/fleet.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"""


from server.routes import GREEN_ROUTE_IDS, SILVER_ROUTE_IDS

red_is_new = lambda x: int(x) >= 1900 and int(x) <= 2151
Expand Down
11 changes: 3 additions & 8 deletions server/mbta_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""


from urllib.parse import urlencode
import datetime
import pytz
Expand Down Expand Up @@ -86,13 +85,9 @@ def maybe_reverse(stops, route):
return reverse_if_stops_out_of_order(stops, "Wonderland", "Bowdoin")
return stops


async def departure_prediction_for_vehicle(vehicle_id, stop_id):
predictions = await getV3(
"predictions",
{
"filter[stop]": stop_id
}
)
predictions = await getV3("predictions", {"filter[stop]": stop_id})

for prediction in predictions:
if prediction["vehicle"]["id"] == vehicle_id:
Expand Down Expand Up @@ -144,7 +139,7 @@ async def vehicle_data_for_routes(route_ids):
"tripId": vehicle["trip"]["id"],
"isNewTrain": is_new,
"updatedAt": vehicle["updated_at"],
"departurePrediction": departure_prediction
"departurePrediction": departure_prediction,
}
)

Expand Down
2 changes: 1 addition & 1 deletion server/secrets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MBTA_V3_API_KEY = ''
MBTA_V3_API_KEY = ""
# False by default, because debug Flask spawns two processes, and two last seen updaters will trample each other!
LAST_SEEN_UPDATE = False
"""
Expand Down

0 comments on commit 4a02e92

Please sign in to comment.