Skip to content
This repository was archived by the owner on Jun 29, 2023. It is now read-only.

Commit 434d705

Browse files
committed
Replace f-strings by str.format() calls
Enable Python<3.6 compatibility
1 parent 6903d80 commit 434d705

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mvg_api/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ def __init__(self, code, reason):
2525
self.reason = reason
2626

2727
def __str__(self):
28-
out = f"Got status code {self.code}"
28+
out = "Got status code {}".format(self.code)
2929
if self.reason:
30-
out += f" with response {self.reason}"
30+
out += " with response {}".format(self.reason)
3131
return out
3232

3333

@@ -187,7 +187,7 @@ def get_locations(query):
187187
188188
"""
189189
try:
190-
query = f"{id_prefix}{int(query)}" # converts old style station id to new style station id
190+
query = "{}{}".format(id_prefix, int(query)) # converts old style station id to new style station id
191191
except(ValueError): # happens if it is a station name
192192
url = query_url_name.format(name=query)
193193
else: # happens if it is a station id

0 commit comments

Comments
 (0)