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,11 +2,15 @@ from datetime import datetime
from typing import Any, Mapping
from pyrmv.classes.message import Message
from pyrmv.utility import ref_upgrade
class LineArrival:
def __init__(self, data: Mapping[str, Any], client, retrieve_stops: bool = True):
self.journey = client.journey_detail(data["JourneyDetailRef"]["ref"])
# Upgrade is temporarily used due to RMV API mismatch
# self.journey = client.journey_detail(data["JourneyDetailRef"]["ref"])
self.journey = client.journey_detail(ref_upgrade(data["JourneyDetailRef"]["ref"]))
self.status = data["JourneyStatus"]
self.messages = []
self.name = data["name"]
@@ -40,7 +44,10 @@ class LineArrival:
class LineDeparture:
def __init__(self, data: Mapping[str, Any], client, retrieve_stops: bool = True):
self.journey = client.journey_detail(data["JourneyDetailRef"]["ref"])
# Upgrade is temporarily used due to RMV API mismatch
# self.journey = client.journey_detail(data["JourneyDetailRef"]["ref"])
self.journey = client.journey_detail(ref_upgrade(data["JourneyDetailRef"]["ref"]))
self.status = data["JourneyStatus"]
self.messages = []
self.name = data["name"]