Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added documentation/DVBpy Classes.dia
Binary file not shown.
Binary file added documentation/DVBpy Classes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions documentation/Docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

8 changes: 4 additions & 4 deletions dvb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class Departure:
"""A single upcoming departure from a stop."""

id: str
line: str
direction: str # destination name
line: str # e.g. 3, 8, RE80
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
line: str # e.g. 3, 8, RE80
line: str # e.g. "3", "8", "RE80"

Examples are good, but please keep the formatting and make the types clear.

direction: str # Most commonly name of last Station
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this change, the VVO/DVB itself describe it as the destination name, and I'd like to keep that wording. Some destinations like "Btf Trachenberge" are specifically not stations.

scheduled: datetime
real_time: datetime | None = None
state: str = "" # real-time state, e.g. "InTime", "Delayed"
Expand Down Expand Up @@ -62,9 +62,9 @@ class PartialRoute:
"""A single leg of a planned route, e.g. one tram ride within a multi-transfer journey."""

duration: int # in minutes
line: str
line: str # e.g. 3, 8, RE80
mode: str # e.g. "Tram", "CityBus", "Footpath", "StayForConnection"
direction: str
direction: str # Most commonly name of last Station
stops: list[RegularStop]
cancelled: bool = False
changeover_endangered: bool = False # transfer to the next leg is at risk
Expand Down