Skip to content

Commit a5a0a44

Browse files
committed
Add more descriptive docstrings for cog_load and cog_unload methods
1 parent e31ccca commit a5a0a44

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

bot/exts/utilities/githubinfo.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,23 @@ def __init__(self, bot: Bot):
8585
self.pydis_repos: dict = {}
8686

8787
async def cog_load(self) -> None:
88-
"""Function to be run at cog load."""
88+
"""
89+
Function to be run at cog load.
90+
91+
Starts the refresh_repos tasks.loop that runs every 24 hours.
92+
"""
8993
self.refresh_repos.start()
9094

9195
with open(STORED_REPOS_FILE) as f:
9296
self.stored_repos = json.load(f)
9397
log.info("Loaded stored repos in memory.")
9498

9599
async def cog_unload(self) -> None:
96-
"""Function to be run at cog unload."""
100+
"""
101+
Function to be run at cog unload.
102+
103+
Cancels the execution of refresh_repos tasks.loop.
104+
"""
97105
self.refresh_repos.cancel()
98106

99107

0 commit comments

Comments
 (0)