mirror of
https://github.com/Dasemu/skipredictor.git
synced 2026-11-26 15:26:15 +00:00
fix(core): clean predictor debt
This commit is contained in:
1 parent
e952cea417
commit
e6add1b727
10 files changed
+268
-58
No files matched your search
@@ -255,6 +255,11 @@ class StationScraper:
|
||||
# Public API
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
@property
|
||||
def station_ids(self) -> tuple[str, ...]:
|
||||
"""Return the configured station identifiers."""
|
||||
return tuple(self._stations.keys())
|
||||
|
||||
def scrape_station(self, station_id: str) -> dict:
|
||||
"""
|
||||
Scrape operational data for a single station.
|
||||
@@ -297,7 +302,7 @@ class StationScraper:
|
||||
List of dicts, one per station, in the same format as scrape_station().
|
||||
"""
|
||||
results = []
|
||||
for station_id in self._stations:
|
||||
for station_id in self.station_ids:
|
||||
record = self.scrape_station(station_id)
|
||||
results.append(record)
|
||||
return results
|
||||
|
||||
Reference in new issue
Block a user