From 7d5454a5dfbf5cb06bef9c54845234a463a46093 Mon Sep 17 00:00:00 2001 From: profitroll Date: Tue, 4 Oct 2022 11:15:53 +0200 Subject: [PATCH] Removed unused imports and fixed docstring --- pyrmv/raw/trip_find.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pyrmv/raw/trip_find.py b/pyrmv/raw/trip_find.py index bd79d81..54d6c1a 100644 --- a/pyrmv/raw/trip_find.py +++ b/pyrmv/raw/trip_find.py @@ -2,9 +2,6 @@ from datetime import datetime from requests import get from typing import List, Union from xmltodict import parse as xmlparse -from pyrmv.classes.Trip import Trip - -from pyrmv.utility.find_exception import find_exception try: from typing import Literal @@ -127,7 +124,7 @@ def trip_find(accessId: str, ) -> dict: """The trip service calculates a trip from a specified origin to a specified destination. These might be stop/station IDs or coordinates based on addresses and points of interest validated by the location service or - coordinates freely defined by the client. + coordinates freely defined by the client. Read more about this in section 2.12. "Trip Search (trip)" of HAFAS ReST Documentation. @@ -156,8 +153,8 @@ def trip_find(accessId: str, * maxChangeTime (int, optional): Maximum change time at stop in minutes. Defaults to None. * addChangeTime (int, optional): This amount of minutes is added to the change time at each stop. Defaults to None. * maxChange (int, optional): Maximum number of changes. In range 0-11. Defaults to None. - * date (str, optional): Sets the start date for which the departures shall be retrieved. Represented in the format `YYYY-MM-DD`. By default the current server date is used. Defaults to None. - * time (str, optional): Sets the start time for which the departures shall be retrieved. Represented in the format `hh:mm[:ss]` in 24h nomenclature. Seconds will be ignored for requests. By default the current server time is used. Defaults to None. + * date (Union[str, datetime], optional): Sets the start date for which the departures shall be retrieved. Represented in the format `YYYY-MM-DD`. By default the current server date is used. Defaults to None. + * time (Union[str, datetime], optional): Sets the start time for which the departures shall be retrieved. Represented in the format `hh:mm[:ss]` in 24h nomenclature. Seconds will be ignored for requests. By default the current server time is used. Defaults to None. * searchForArrival (bool, optional): If set, the date and time parameters specify the arrival time for the trip search instead of the departure time. Defaults to False. * numF (int, optional): Minimum number of trips after the search time. Sum of numF and numB has to be less or equal 6. Read more about this in HAFAS ReST Documentation. In range 1-6. Defaults to None. * numB (int, optional): Minimum number of trips before the search time. Sum of numF and numB has to be less or equal 6. Read more about this in HAFAS ReST Documentation. In range 0-6. Defaults to None.