Compare commits

...

6 commits

Author SHA1 Message Date
b6d77a593b
Merge branch 'main' into aurora/v3
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 36s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 43s
2025-01-25 20:41:49 -05:00
e5210420cb
chore(vscode): force load hotreload in launch & debug configuration
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 35s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 40s
2025-01-26 01:08:06 +00:00
1677412b56
chore(hotreload): add disclaimer in install message that this cog doesn't add any commands
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 36s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 40s
2025-01-26 00:56:50 +00:00
451ecfe5d9
chore(tooling): disable too-many-positional-arguments
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 37s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 41s
2025-01-26 00:48:25 +00:00
8511b7b964
fix(bible): mark cog_unload as async 2025-01-26 00:46:21 +00:00
f233a7dec5
fix(hotreload): mark cog_load and cog_unload as async 2025-01-26 00:46:00 +00:00
5 changed files with 8 additions and 7 deletions

View file

@ -12,6 +12,7 @@
too-many-locals, too-many-locals,
too-many-public-methods, too-many-public-methods,
too-many-statements, too-many-statements,
too-many-positional-arguments,
arguments-differ, arguments-differ,
too-many-return-statements, too-many-return-statements,
import-outside-toplevel, import-outside-toplevel,

4
.vscode/launch.json vendored
View file

@ -5,11 +5,11 @@
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "Red-DiscordBot", "name": "Python: Red-DiscordBot",
"type": "debugpy", "type": "debugpy",
"request": "launch", "request": "launch",
"module": "redbot", "module": "redbot",
"args": ["local", "--dev", "-vvv"] "args": ["local", "--dev", "-vvv", "--load-cogs=hotreload"]
} }
] ]
} }

View file

@ -39,7 +39,7 @@ class Bible(commands.Cog):
self.config.register_global(bible="de4e12af7f28f599-02") self.config.register_global(bible="de4e12af7f28f599-02")
self.config.register_user(bible=None) self.config.register_user(bible=None)
def cog_unload(self): async def cog_unload(self):
create_task(self.session.close()) create_task(self.session.close())
def format_help_for_context(self, ctx: commands.Context) -> str: def format_help_for_context(self, ctx: commands.Context) -> str:

View file

@ -16,7 +16,7 @@ class HotReload(commands.Cog):
__author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"]
__git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs"
__version__ = "1.1.1" __version__ = "1.1.2"
__documentation__ = "https://seacogs.coastalcommits.com/hotreload/" __documentation__ = "https://seacogs.coastalcommits.com/hotreload/"
def __init__(self, bot: Red) -> None: def __init__(self, bot: Red) -> None:
@ -28,11 +28,11 @@ class HotReload(commands.Cog):
for watchdog_logger in watchdog_loggers: for watchdog_logger in watchdog_loggers:
watchdog_logger.setLevel("INFO") # SHUT UP!!!! watchdog_logger.setLevel("INFO") # SHUT UP!!!!
def cog_load(self) -> None: async def cog_load(self) -> None:
"""Start the observer when the cog is loaded.""" """Start the observer when the cog is loaded."""
self.bot.loop.create_task(self.start_observer()) self.bot.loop.create_task(self.start_observer())
def cog_unload(self) -> None: async def cog_unload(self) -> None:
"""Stop the observer when the cog is unloaded.""" """Stop the observer when the cog is unloaded."""
if self.observer: if self.observer:
self.observer.stop() self.observer.stop()

View file

@ -1,6 +1,6 @@
{ {
"author" : ["cswimr"], "author" : ["cswimr"],
"install_msg" : "Thank you for installing HotReload!", "install_msg" : "Thank you for installing HotReload! This cog does not provide any commands, please see the [documentation](https://seacogs.coastalcommits.com/hotreload) for more information.",
"name" : "HotReload", "name" : "HotReload",
"short" : "Automatically reload cogs in local cog paths on file change.", "short" : "Automatically reload cogs in local cog paths on file change.",
"description" : "Automatically reload cogs in local cog paths on file change.", "description" : "Automatically reload cogs in local cog paths on file change.",