Skip to content

Commit

Permalink
Add line number
Browse files Browse the repository at this point in the history
  • Loading branch information
polgarc committed Jan 19, 2024
1 parent e3f4b6d commit 05cb2a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,6 @@ ENV/

# mypy
.mypy_cache/

# PyCharm
.idea
3 changes: 2 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Changes
=======

20231213 - 0.4.1
20240113 - 0.5.0
----------------

- Add KeyError exception (thanks @miaucl)
- Add line numbers (thanks @polgarc)

20231120 - 0.4.0
----------------
Expand Down
4 changes: 3 additions & 1 deletion opendata_transport/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ def get_connection(connection):
connection_info["number"] = ""
for section in connection["sections"]:
if section["journey"] is not None:
connection_info["number"] = section["journey"]["name"]
journey = section["journey"]
connection_info["number"] = journey["name"]
connection_info["line"] = ''.join(filter(None, [journey["category"], journey["number"]]))
break

connection_info["platform"] = connection["from"]["platform"]
Expand Down

0 comments on commit 05cb2a0

Please sign in to comment.