Add docstrings to functions
This commit is contained in:
1 parent
98215565a8
commit
2278ff0a12
1 file changed
+15
-3
@@ -18,7 +18,11 @@ project_variables = envutil.load_environment_variables()
|
|||||||
|
|
||||||
|
|
||||||
def get_record_count(table_name: str) -> int | None:
|
def get_record_count(table_name: str) -> int | None:
|
||||||
"""get the most recent draw record from the specified table"""
|
"""
|
||||||
|
:param table_name: the name of the table to get a count of records from
|
||||||
|
|
||||||
|
:returns: the count of records found in the specified table
|
||||||
|
"""
|
||||||
game_dict = drawutil.check_table_name(table_name=table_name)
|
game_dict = drawutil.check_table_name(table_name=table_name)
|
||||||
if game_dict:
|
if game_dict:
|
||||||
dal.connect()
|
dal.connect()
|
||||||
@@ -30,7 +34,11 @@ def get_record_count(table_name: str) -> int | None:
|
|||||||
|
|
||||||
|
|
||||||
def get_recent_draw_date(table_name: str) -> datetime | None:
|
def get_recent_draw_date(table_name: str) -> datetime | None:
|
||||||
"""get the most recent draw date from the specified table"""
|
"""
|
||||||
|
:param table_name: the name of the table to get the most recent draw date from
|
||||||
|
|
||||||
|
:returns datetime: the most recent draw date, if there is one
|
||||||
|
"""
|
||||||
game_dict = drawutil.check_table_name(table_name=table_name)
|
game_dict = drawutil.check_table_name(table_name=table_name)
|
||||||
if game_dict:
|
if game_dict:
|
||||||
dal.connect()
|
dal.connect()
|
||||||
@@ -42,7 +50,11 @@ def get_recent_draw_date(table_name: str) -> datetime | None:
|
|||||||
|
|
||||||
|
|
||||||
def get_missing_records(table_name: str) -> int:
|
def get_missing_records(table_name: str) -> int:
|
||||||
"""collect and insert missing records, returning a count of insertions"""
|
"""
|
||||||
|
:param table_name: the name of the table to collect and insert missing records in
|
||||||
|
|
||||||
|
:returns: the number of records inserted into the target table
|
||||||
|
"""
|
||||||
# if the table_name is valid
|
# if the table_name is valid
|
||||||
game_dict = drawutil.check_table_name(table_name=table_name)
|
game_dict = drawutil.check_table_name(table_name=table_name)
|
||||||
if game_dict:
|
if game_dict:
|
||||||
|
|||||||
Reference in new issue
Block a user