Skip to content

Commit 5a37427

Browse files
committed
Better formatting
1 parent 6e69c41 commit 5a37427

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

providers/aseag.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1717

1818
"""
19-
Public transport stops and departures from ASEAG, Aachen Germany.
19+
Public transport stops and departures from ASEAG, Aachen, Germany.
20+
2021
API not seperately documented but uses URA interface like TfL.
21-
See: http://content.tfl.gov.uk/tfl-live-bus-river-bus-arrivals-api-documentation.pdf
22+
http://content.tfl.gov.uk/tfl-live-bus-river-bus-arrivals-api-documentation.pdf
2223
"""
2324

25+
import json
2426
import pan
2527
import urllib.parse
26-
import json
2728

2829
RETURN_LIST = [
2930
"StopPointName",
@@ -102,7 +103,7 @@ def find_nearby_stops(x, y):
102103
"""Return a list of stops near given coordinates."""
103104
radius = 500
104105
params = {
105-
"Circle": str(y)+","+str(x)+","+str(radius),
106+
"Circle": "{:.6f},{:.6f},{:d}".format(y, x, radius),
106107
"ReturnList": ",".join(RETURN_LIST),
107108
}
108109
url = format_url("/instant_V2", **params)
@@ -140,10 +141,9 @@ def parsejson_find_nearby_stops(data):
140141

141142
def find_stops(query, x, y):
142143
"""Return a list of stops matching `query`."""
143-
query = urllib.parse.quote(query)
144144
params = {
145145
"maxResults": "10",
146-
"searchString": query,
146+
"searchString": urllib.parse.quote(query),
147147
"searchTypes": "STOPPOINT",
148148
}
149149
url = format_url("/location", **params)

0 commit comments

Comments
 (0)