diff --git a/tuxbot/cogs/Crypto/functions/parser.py b/tuxbot/cogs/Crypto/functions/parser.py index ce9f5d9..8c00b2d 100644 --- a/tuxbot/cogs/Crypto/functions/parser.py +++ b/tuxbot/cogs/Crypto/functions/parser.py @@ -6,7 +6,7 @@ def data_parser(data: str) -> dict: "message": "", "compressed": False, "graphical": False, - "chars": tuple(), + "chars": tuple, } if not data: diff --git a/tuxbot/cogs/Network/network.py b/tuxbot/cogs/Network/network.py index a244788..9f234c6 100644 --- a/tuxbot/cogs/Network/network.py +++ b/tuxbot/cogs/Network/network.py @@ -1,5 +1,4 @@ import asyncio -import functools import logging import time from typing import Union diff --git a/tuxbot/core/utils/functions/extra.py b/tuxbot/core/utils/functions/extra.py index 5ce5bb1..78ce00e 100644 --- a/tuxbot/core/utils/functions/extra.py +++ b/tuxbot/core/utils/functions/extra.py @@ -51,6 +51,7 @@ class ContextPlus(commands.Context): e = embed.to_dict() for key, value in e.items(): if isinstance(value, (str, bytes)): + # skipcq e[key] = ( value.replace( self.bot.config.Core.token, TOKEN_REPLACEMENT @@ -63,32 +64,40 @@ class ContextPlus(commands.Context): .replace(self.bot.config.Core.ip6, IP_REPLACEMENT) ) elif isinstance(value, list): + # skipcq e[key] = replace_in_list( value, self.bot.config.Core.token, TOKEN_REPLACEMENT ) + # skipcq e[key] = replace_in_list( e[key], self.bot.config.Core.Database.password, PASSWORD_REPLACEMENT, ) + # skipcq e[key] = replace_in_list( e[key], self.bot.config.Core.ip, IP_REPLACEMENT ) + # skipcq e[key] = replace_in_list( e[key], self.bot.config.Core.ip6, IP_REPLACEMENT ) elif isinstance(value, dict): + # skipcq e[key] = replace_in_dict( value, self.bot.config.Core.token, TOKEN_REPLACEMENT ) + # skipcq e[key] = replace_in_dict( e[key], self.bot.config.Core.Database.password, PASSWORD_REPLACEMENT, ) + # skipcq e[key] = replace_in_dict( e[key], self.bot.config.Core.ip, IP_REPLACEMENT ) + # skipcq e[key] = replace_in_dict( e[key], self.bot.config.Core.ip6, IP_REPLACEMENT ) diff --git a/tuxbot/setup.py b/tuxbot/setup.py index 72e31d1..6a6d986 100644 --- a/tuxbot/setup.py +++ b/tuxbot/setup.py @@ -199,7 +199,7 @@ def additional_config(cogs: Union[str, list] = "**"): console.print(Rule(f"\nConfiguration for `{cog_name}` module")) mod = importlib.import_module(str(path).replace("/", ".")[:-3]) mod_config_type = getattr(mod, cog_name.capitalize() + "Config") - mod_extra = getattr(mod, "extra") + mod_extra = mod.extra mod_config = config.ConfigFile( str(cogs_data_path(cog_name) / "config.yaml"),