From 0ba8682243323e9a5d38afffac36a87c7ceb5d6e Mon Sep 17 00:00:00 2001 From: Lucas Jensen Date: Sat, 4 May 2024 11:41:10 -0700 Subject: [PATCH] minor variable name changes --- server/app/controllers/events.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/app/controllers/events.py b/server/app/controllers/events.py index 69eee4f..8976b8c 100644 --- a/server/app/controllers/events.py +++ b/server/app/controllers/events.py @@ -22,19 +22,19 @@ class EventController(BaseController): super().__init__() self.db: EventQueries = event_queries - def _all_series(self, data: list[dict]) -> dict[str, EventSeries]: + def _all_series(self, data_rows: list[dict]) -> dict[str, EventSeries]: """Creates and returns a dictionary of EventSeries objects from a list of sql rows (as dicts). Should only be used internally. Args: - data (list[dict]): List of dicts, each representing a row from the database. `event_id` may be null + data_rows (list[dict]): List of dicts, each representing a row from the database. `event_id` may be null Returns: dict[str, EventSeries]: A dictionary of EventSeries objects, keyed by series name """ all_series: dict[str, EventSeries] = {} - for event_series_row in data: + for event_series_row in data_rows: series_name: str = event_series_row["name"] if series_name not in all_series: all_series[series_name] = EventSeries(**event_series_row, events=[])