fix(hotreload): pylint fixes
All checks were successful
Actions / Build Documentation (MkDocs) (push) Successful in 33s
Actions / Lint Code (Ruff & Pylint) (push) Successful in 36s

This commit is contained in:
cswimr 2025-03-28 10:16:26 -05:00
parent c0c84358ef
commit ab22b791d1
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087

View file

@ -21,7 +21,7 @@ class HotReload(commands.Cog):
__author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"]
__git__ = "https://www.coastalcommits.com/cswimr/SeaCogs"
__version__ = "1.4.1"
__version__ = "1.4.2"
__documentation__ = "https://seacogs.coastalcommits.com/hotreload/"
def __init__(self, bot: Red) -> None:
@ -60,6 +60,7 @@ class HotReload(commands.Cog):
]
return "\n".join(text)
# pylint: disable=protected-access
async def get_paths(self) -> Generator[Path, None, None]:
"""Retrieve user defined paths."""
cog_manager = self.bot._cog_mgr # noqa: SLF001 # We have to use this private method because there is no public API to get user defined paths
@ -91,7 +92,6 @@ class HotReload(commands.Cog):
@commands.group(name="hotreload")
async def hotreload_group(self, ctx: commands.Context) -> None:
"""HotReload configuration commands."""
pass
@hotreload_group.command(name="notifychannel")
async def hotreload_notifychannel(self, ctx: commands.Context, channel: discord.TextChannel) -> None:
@ -155,6 +155,7 @@ class HotReloadHandler(RegexMatchingEventHandler):
loop=self.cog.bot.loop,
)
# pylint: disable=protected-access
async def reload_cogs(self, cog_names: Sequence[str], paths: Sequence[Path]) -> None:
"""Reload modified cogs."""
if not self.compile_modified_files(cog_names, paths):