Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arnasbr committed Apr 30, 2024
1 parent eb94d59 commit 8983277
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ exclude =
traveltimepy/TimeFilterFastResponse_pb2.py

[mypy]
exclude = ^(traveltimepy/TimeFilterFastRequest_pb2.py|traveltimepy/TimeFilterFastResponse_pb2.py)$
exclude = ^(build/|venv/|traveltimepy/TimeFilterFastRequest_pb2.py|traveltimepy/TimeFilterFastResponse_pb2.py)$

3 changes: 2 additions & 1 deletion tests/routes_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ async def test_snap_penalty(sdk: TravelTimeSdk):
traveltime_without_penalty = (
result_without_penalty[0].locations[0].properties[0].travel_time
)

assert traveltime_with_penalty is not None
assert traveltime_without_penalty is not None
assert traveltime_with_penalty > traveltime_without_penalty
3 changes: 1 addition & 2 deletions traveltimepy/dto/requests/time_map_geojson.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from geojson_pydantic import FeatureCollection
from traveltimepy.dto.requests.request import TravelTimeRequest
from traveltimepy.dto.requests.time_map import (
TimeMapRequest,
DepartureSearch,
ArrivalSearch,
)
Expand All @@ -16,7 +15,7 @@ class TimeMapRequestGeojson(TravelTimeRequest[FeatureCollection]):

def split_searches(self, window_size: int) -> List[TravelTimeRequest]:
return [
TimeMapRequest(
TimeMapRequestGeojson(
departure_searches=departures,
arrival_searches=arrivals,
)
Expand Down
4 changes: 2 additions & 2 deletions traveltimepy/http.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import asyncio
import json
from dataclasses import dataclass
from typing import TypeVar, Type, Dict
from typing import TypeVar, Type, Dict, Optional

from aiohttp import ClientSession, ClientResponse, TCPConnector, ClientTimeout
from pydantic import BaseModel
Expand Down Expand Up @@ -88,7 +88,7 @@ async def send_get_async(
path: str,
headers: Dict[str, str],
sdk_params: SdkParams,
params: Dict[str, str],
params: Optional[Dict[str, str]],
) -> T:
async with ClientSession(
timeout=ClientTimeout(total=sdk_params.timeout),
Expand Down
1 change: 1 addition & 0 deletions traveltimepy/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ async def map_info_async(self) -> List[Map]:
"map-info",
self._headers(AcceptType.JSON),
self._sdk_params,
None,
)
return res.maps

Expand Down

0 comments on commit 8983277

Please sign in to comment.