Clarified to_dict function description.
This commit is contained in:
+4
-1
@@ -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
|
||||
|
||||
+4
-1
@@ -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
|
||||
|
||||
+4
-1
@@ -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"] = {}
|
||||
|
||||
Reference in New Issue
Block a user