Format python
This commit is contained in:
parent
85f5770e09
commit
4c258018c3
17 changed files with 348 additions and 248 deletions
|
|
@ -1,11 +1,7 @@
|
|||
"""Configuration constants for journey times processing."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from .models import Destination
|
||||
|
||||
DATA_DIR = Path("./data_sources")
|
||||
OUTPUT_DIR = DATA_DIR / "processed"
|
||||
|
||||
MAX_DELAY = 10
|
||||
REQUESTS_PER_MIN = 500
|
||||
|
|
|
|||
|
|
@ -99,9 +99,7 @@ async def fetch_journey_for_mode(
|
|||
journeys = data.get("journeys", [])
|
||||
if journeys:
|
||||
durations = [
|
||||
j["duration"]
|
||||
for j in journeys
|
||||
if j.get("duration") is not None
|
||||
j["duration"] for j in journeys if j.get("duration") is not None
|
||||
]
|
||||
if durations:
|
||||
return min(durations)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue