Attempt to temporarily fix #2
Some checks failed
Tests / test (3.10) (push) Failing after 23m0s
Tests / test (3.11) (push) Failing after 22m55s
Tests / test (3.8) (push) Failing after 22m56s
Tests / test (3.9) (push) Failing after 22m54s

This commit is contained in:
2023-11-24 23:52:50 +01:00
parent efedb2533b
commit 414f3966da
7 changed files with 68 additions and 21 deletions

View File

@@ -2,6 +2,7 @@ from typing import Any, Mapping
from pyrmv.classes.message import Message
from pyrmv.classes.stop import Stop
from pyrmv.utility import ref_upgrade
class Journey:
@@ -9,7 +10,11 @@ class Journey:
def __init__(self, data: Mapping[str, Any]):
self.stops = []
self.ref = data["ref"]
# Upgrade is temporarily used due to RMV API mismatch
# self.ref = data["ref"]
self.ref = ref_upgrade(data["ref"])
self.direction = data["Directions"]["Direction"][0]["value"]
self.direction_flag = data["Directions"]["Direction"][0]["flag"]
self.stops.extend(Stop(stop) for stop in data["Stops"]["Stop"])