Some errors ignored
This commit is contained in:
parent
9c9489aee1
commit
d23d9a005d
@ -57,7 +57,7 @@ class Client():
|
|||||||
|
|
||||||
# Look for stops using all possible methods
|
# Look for stops using all possible methods
|
||||||
stop_by_coords client.stop_by_coords(50.131140, 8.733362, radius=300, max_number=3)
|
stop_by_coords client.stop_by_coords(50.131140, 8.733362, radius=300, max_number=3)
|
||||||
stop_by_id = client.stop_by_id("A=1@O=Offenbach (Main)-Zentrum Marktplatz\/Frankf. Straße@X=8764456@Y=50105181@U=80@L=3002510@")
|
stop_by_id = client.stop_by_id("A=1@O=Offenbach (Main)-Zentrum Marktplatz/Frankf. Straße@X=8764456@Y=50105181@U=80@L=3002510@")
|
||||||
stop_by_name = client.stop_by_name("Groß Karben", max_number=3)
|
stop_by_name = client.stop_by_name("Groß Karben", max_number=3)
|
||||||
|
|
||||||
# Find a trip and reconstruct it
|
# Find a trip and reconstruct it
|
||||||
@ -110,10 +110,10 @@ class Client():
|
|||||||
accessId=self.access_id,
|
accessId=self.access_id,
|
||||||
id=id,
|
id=id,
|
||||||
extId=id_ext,
|
extId=id_ext,
|
||||||
direction=direction,
|
direction=direction, # type: ignore
|
||||||
date=date,
|
date=date,
|
||||||
time=time,
|
time=time,
|
||||||
duration=duration,
|
duration=duration, # type: ignore
|
||||||
maxJourneys=journeys_max,
|
maxJourneys=journeys_max,
|
||||||
operators=operators,
|
operators=operators,
|
||||||
lines=lines,
|
lines=lines,
|
||||||
@ -166,10 +166,10 @@ class Client():
|
|||||||
accessId=self.access_id,
|
accessId=self.access_id,
|
||||||
id=id,
|
id=id,
|
||||||
extId=id_ext,
|
extId=id_ext,
|
||||||
direction=direction,
|
direction=direction, # type: ignore
|
||||||
date=date,
|
date=date,
|
||||||
time=time,
|
time=time,
|
||||||
duration=duration,
|
duration=duration, # type: ignore
|
||||||
maxJourneys=journeys_max,
|
maxJourneys=journeys_max,
|
||||||
operators=operators,
|
operators=operators,
|
||||||
lines=lines,
|
lines=lines,
|
||||||
@ -182,28 +182,28 @@ class Client():
|
|||||||
return BoardDeparture(board_raw, self)
|
return BoardDeparture(board_raw, self)
|
||||||
|
|
||||||
def him_search(self,
|
def him_search(self,
|
||||||
date_begin: Union[str, datetime] = None,
|
date_begin: Union[str, datetime] = None, # type: ignore
|
||||||
date_end: Union[str, datetime] = None,
|
date_end: Union[str, datetime] = None, # type: ignore
|
||||||
time_begin: Union[str, datetime] = None,
|
time_begin: Union[str, datetime] = None, # type: ignore
|
||||||
time_end: Union[str, datetime] = None,
|
time_end: Union[str, datetime] = None, # type: ignore
|
||||||
weekdays: Union[str, OrderedDict[str, bool]] = None,
|
weekdays: Union[str, OrderedDict[str, bool]] = None, # type: ignore
|
||||||
ids: list = None,
|
ids: list = None, # type: ignore
|
||||||
operators: list = None,
|
operators: list = None, # type: ignore
|
||||||
categories: list = None,
|
categories: list = None, # type: ignore
|
||||||
channels: list = None,
|
channels: list = None, # type: ignore
|
||||||
companies: list = None,
|
companies: list = None, # type: ignore
|
||||||
lines: list = None,
|
lines: list = None, # type: ignore
|
||||||
line_ids: list = None,
|
line_ids: list = None, # type: ignore
|
||||||
stations: Union[list, List[Stop]] = None,
|
stations: Union[list, List[Stop]] = None, # type: ignore
|
||||||
station_from: Union[str, Stop] = None,
|
station_from: Union[str, Stop] = None, # type: ignore
|
||||||
station_to: Union[str, Stop] = None,
|
station_to: Union[str, Stop] = None, # type: ignore
|
||||||
both_ways: bool = None,
|
both_ways: bool = None, # type: ignore
|
||||||
train_names: list = None,
|
train_names: list = None, # type: ignore
|
||||||
search_mode: Literal[SearchMode.MATCH, SearchMode.NOMATCH, SearchMode.TFMATCH] = None,
|
search_mode: Literal[SearchMode.MATCH, SearchMode.NOMATCH, SearchMode.TFMATCH] = None, # type: ignore
|
||||||
affected_journey_mode: Literal[AffectedJourneyMode.ALL, AffectedJourneyMode.OFF] = None,
|
affected_journey_mode: Literal[AffectedJourneyMode.ALL, AffectedJourneyMode.OFF] = None, # type: ignore
|
||||||
affected_journey_stop_mode: Literal[AffectedJourneyStopMode.ALL, AffectedJourneyStopMode.IMP, AffectedJourneyStopMode.OFF] = None,
|
affected_journey_stop_mode: Literal[AffectedJourneyStopMode.ALL, AffectedJourneyStopMode.IMP, AffectedJourneyStopMode.OFF] = None, # type: ignore
|
||||||
priority_min: int = None,
|
priority_min: int = None, # type: ignore
|
||||||
priority_max: int = None
|
priority_max: int = None # type: ignore
|
||||||
) -> List[Message]:
|
) -> List[Message]:
|
||||||
"""The him_search method will deliver a list of HIM messages if matched by the given criteria as
|
"""The him_search method will deliver a list of HIM messages if matched by the given criteria as
|
||||||
well as affected products if any.
|
well as affected products if any.
|
||||||
@ -239,10 +239,10 @@ class Client():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if isinstance(station_from, Stop):
|
if isinstance(station_from, Stop):
|
||||||
station_from = station_from.ext_id
|
station_from = station_from.ext_id # type: ignore
|
||||||
|
|
||||||
if isinstance(station_to, Stop):
|
if isinstance(station_to, Stop):
|
||||||
station_to = station_to.ext_id
|
station_to = station_to.ext_id # type: ignore
|
||||||
|
|
||||||
if stations != None:
|
if stations != None:
|
||||||
new_stations = []
|
new_stations = []
|
||||||
@ -254,17 +254,17 @@ class Client():
|
|||||||
stations = new_stations
|
stations = new_stations
|
||||||
|
|
||||||
if search_mode == None:
|
if search_mode == None:
|
||||||
search_mode = None
|
search_mode = None # type: ignore
|
||||||
else:
|
else:
|
||||||
search_mode = search_mode.code
|
search_mode = search_mode.code
|
||||||
|
|
||||||
if affected_journey_mode == None:
|
if affected_journey_mode == None:
|
||||||
affected_journey_mode = None
|
affected_journey_mode = None # type: ignore
|
||||||
else:
|
else:
|
||||||
affected_journey_mode = affected_journey_mode.code
|
affected_journey_mode = affected_journey_mode.code
|
||||||
|
|
||||||
if affected_journey_stop_mode == None:
|
if affected_journey_stop_mode == None:
|
||||||
affected_journey_stop_mode = None
|
affected_journey_stop_mode = None # type: ignore
|
||||||
else:
|
else:
|
||||||
affected_journey_stop_mode = affected_journey_stop_mode.code
|
affected_journey_stop_mode = affected_journey_stop_mode.code
|
||||||
|
|
||||||
@ -284,13 +284,13 @@ class Client():
|
|||||||
lines=lines,
|
lines=lines,
|
||||||
lineids=line_ids,
|
lineids=line_ids,
|
||||||
stations=stations,
|
stations=stations,
|
||||||
fromstation=station_from,
|
fromstation=station_from, # type: ignore
|
||||||
tostation=station_to,
|
tostation=station_to, # type: ignore
|
||||||
bothways=both_ways,
|
bothways=both_ways,
|
||||||
trainnames=train_names,
|
trainnames=train_names,
|
||||||
searchmode=search_mode,
|
searchmode=search_mode, # type: ignore
|
||||||
affectedJourneyMode=affected_journey_mode,
|
affectedJourneyMode=affected_journey_mode, # type: ignore
|
||||||
affectedJourneyStopMode=affected_journey_stop_mode,
|
affectedJourneyStopMode=affected_journey_stop_mode, # type: ignore
|
||||||
maxprio=priority_max,
|
maxprio=priority_max,
|
||||||
minprio=priority_min
|
minprio=priority_min
|
||||||
)
|
)
|
||||||
@ -332,7 +332,7 @@ class Client():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if real_time_mode == None:
|
if real_time_mode == None:
|
||||||
real_time_mode = None
|
real_time_mode = None # type: ignore
|
||||||
else:
|
else:
|
||||||
real_time_mode = real_time_mode.code
|
real_time_mode = real_time_mode.code
|
||||||
|
|
||||||
@ -340,11 +340,11 @@ class Client():
|
|||||||
accessId=self.access_id,
|
accessId=self.access_id,
|
||||||
id=id,
|
id=id,
|
||||||
date=date,
|
date=date,
|
||||||
rtMode=real_time_mode,
|
rtMode=real_time_mode, # type: ignore
|
||||||
fromId=from_id,
|
fromId=from_id,
|
||||||
fromIdx=from_index,
|
fromIdx=from_index, # type: ignore
|
||||||
toId=to_id,
|
toId=to_id,
|
||||||
toIdx=to_index
|
toIdx=to_index # type: ignore
|
||||||
)
|
)
|
||||||
|
|
||||||
find_exception(journey_raw)
|
find_exception(journey_raw)
|
||||||
@ -380,7 +380,7 @@ class Client():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if selection_mode == None:
|
if selection_mode == None:
|
||||||
selection_mode = None
|
selection_mode = None # type: ignore
|
||||||
else:
|
else:
|
||||||
selection_mode = selection_mode.code
|
selection_mode = selection_mode.code
|
||||||
|
|
||||||
@ -393,7 +393,7 @@ class Client():
|
|||||||
radius=radius,
|
radius=radius,
|
||||||
maxNo=max_number,
|
maxNo=max_number,
|
||||||
stopType=stop_type.code,
|
stopType=stop_type.code,
|
||||||
locationSelectionMode=selection_mode
|
locationSelectionMode=selection_mode # type: ignore
|
||||||
)
|
)
|
||||||
|
|
||||||
find_exception(stops_raw)
|
find_exception(stops_raw)
|
||||||
@ -478,7 +478,7 @@ class Client():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if selection_mode == None:
|
if selection_mode == None:
|
||||||
selection_mode = None
|
selection_mode = None # type: ignore
|
||||||
else:
|
else:
|
||||||
selection_mode = selection_mode.code
|
selection_mode = selection_mode.code
|
||||||
|
|
||||||
@ -489,7 +489,7 @@ class Client():
|
|||||||
lang=lang.code,
|
lang=lang.code,
|
||||||
maxNo=max_number,
|
maxNo=max_number,
|
||||||
stopType=stop_type.code,
|
stopType=stop_type.code,
|
||||||
locationSelectionMode=selection_mode,
|
locationSelectionMode=selection_mode, # type: ignore
|
||||||
coordLat=coord_lat,
|
coordLat=coord_lat,
|
||||||
coordLong=coord_lon,
|
coordLong=coord_lon,
|
||||||
radius=radius,
|
radius=radius,
|
||||||
@ -623,7 +623,7 @@ class Client():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if real_time_mode == None:
|
if real_time_mode == None:
|
||||||
real_time_mode = None
|
real_time_mode = None # type: ignore
|
||||||
else:
|
else:
|
||||||
real_time_mode = real_time_mode.code
|
real_time_mode = real_time_mode.code
|
||||||
|
|
||||||
@ -682,7 +682,7 @@ class Client():
|
|||||||
|
|
||||||
showPassingPoints=passing_points,
|
showPassingPoints=passing_points,
|
||||||
|
|
||||||
rtMode=real_time_mode,
|
rtMode=real_time_mode, # type: ignore
|
||||||
|
|
||||||
includeEarlier=include_earlier,
|
includeEarlier=include_earlier,
|
||||||
withICTAlternatives=ict_alternatives,
|
withICTAlternatives=ict_alternatives,
|
||||||
@ -699,18 +699,18 @@ class Client():
|
|||||||
return trips
|
return trips
|
||||||
|
|
||||||
def trip_recon(self,
|
def trip_recon(self,
|
||||||
context: Union[str, Journey],
|
context: Union[str, Trip],
|
||||||
date: Union[str, datetime] = None,
|
date: Union[str, datetime] = None, # type: ignore
|
||||||
match_real_time: bool = None,
|
match_real_time: bool = None, # type: ignore
|
||||||
enable_replacements: bool = None,
|
enable_replacements: bool = None, # type: ignore
|
||||||
arrival_dev_lower: int = None,
|
arrival_dev_lower: int = None, # type: ignore
|
||||||
arrival_dev_upper: int = None,
|
arrival_dev_upper: int = None, # type: ignore
|
||||||
departure_dev_lower: int = None,
|
departure_dev_lower: int = None, # type: ignore
|
||||||
departure_dev_upper: int = None,
|
departure_dev_upper: int = None, # type: ignore
|
||||||
passlist: bool = None,
|
passlist: bool = None, # type: ignore
|
||||||
passing_points: bool = False,
|
passing_points: bool = False,
|
||||||
real_time_mode: Literal[RealTimeMode.FULL, RealTimeMode.INFOS, RealTimeMode.OFF, RealTimeMode.REALTIME, RealTimeMode.SERVER_DEFAULT] = None,
|
real_time_mode: Literal[RealTimeMode.FULL, RealTimeMode.INFOS, RealTimeMode.OFF, RealTimeMode.REALTIME, RealTimeMode.SERVER_DEFAULT] = None, # type: ignore
|
||||||
tariff: bool = None,
|
tariff: bool = None, # type: ignore
|
||||||
messages: bool = False
|
messages: bool = False
|
||||||
) -> List[Trip]:
|
) -> List[Trip]:
|
||||||
"""Reconstructing a trip can be achieved using the reconstruction context provided by any trip result in the
|
"""Reconstructing a trip can be achieved using the reconstruction context provided by any trip result in the
|
||||||
@ -739,7 +739,7 @@ class Client():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if real_time_mode == None:
|
if real_time_mode == None:
|
||||||
real_time_mode = None
|
real_time_mode = None # type: ignore
|
||||||
else:
|
else:
|
||||||
real_time_mode = real_time_mode.code
|
real_time_mode = real_time_mode.code
|
||||||
|
|
||||||
@ -749,7 +749,7 @@ class Client():
|
|||||||
trips = []
|
trips = []
|
||||||
trips_raw = raw_trip_recon(
|
trips_raw = raw_trip_recon(
|
||||||
accessId=self.access_id,
|
accessId=self.access_id,
|
||||||
ctx=context,
|
ctx=context, # type: ignore
|
||||||
date=date,
|
date=date,
|
||||||
matchRtType=match_real_time,
|
matchRtType=match_real_time,
|
||||||
enableReplacements=enable_replacements,
|
enableReplacements=enable_replacements,
|
||||||
@ -759,7 +759,7 @@ class Client():
|
|||||||
depU=departure_dev_upper,
|
depU=departure_dev_upper,
|
||||||
passlist=passlist,
|
passlist=passlist,
|
||||||
showPassingPoints=passing_points,
|
showPassingPoints=passing_points,
|
||||||
rtMode=real_time_mode,
|
rtMode=real_time_mode, # type: ignore
|
||||||
tariff=tariff,
|
tariff=tariff,
|
||||||
trafficMessages=messages,
|
trafficMessages=messages,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user