From 96fce1d661f0a96b56530ebaf10ae89ba6f08e4d Mon Sep 17 00:00:00 2001 From: alwayscompiling Date: Mon, 1 Aug 2022 21:12:46 -0400 Subject: [PATCH] Clarified to_dict function description. --- data/category.py | 5 ++++- data/guild.py | 5 ++++- data/table.py | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/data/category.py b/data/category.py index 1ed6bda..a53eeb4 100644 --- a/data/category.py +++ b/data/category.py @@ -75,7 +75,10 @@ class Category: del score def to_dict(self) -> dict: - """Saves category data as a python dictionary.""" + """ + Saves category data as a python dictionary. + Does not include category name. It should be the key of above data structure. + """ data = {} data["ascending"] = self.ascending data["time_record"] = self.time_record diff --git a/data/guild.py b/data/guild.py index 7887fd0..8c8fb04 100644 --- a/data/guild.py +++ b/data/guild.py @@ -95,7 +95,10 @@ class Guild: self._table_map[table.name] = table def to_dict(self) -> dict: - """Creates python dictionary object from class data.""" + """ + Creates python dictionary object from class data. + Does not include guild_id in dict, it should be the key of above data structure. + """ data: dict = {} data["highscore_channel_id"] = self.highscore_channel diff --git a/data/table.py b/data/table.py index 8fc4b59..5860348 100644 --- a/data/table.py +++ b/data/table.py @@ -57,7 +57,10 @@ class Table: return self._categories_map[category_name] def to_dict(self) -> dict: - """Saves table as a python dictionary.""" + """ + Saves table as a python dictionary. + Does not include table name. It should be the key of above data structure. + """ data = {} data["message_id"] = self.message_id data["categories"] = {}