style
This commit is contained in:
parent
1b7f153ec8
commit
7f9c202cc6
4 changed files with 11 additions and 3 deletions
|
@ -6,7 +6,7 @@ def data_parser(data: str) -> dict:
|
|||
"message": "",
|
||||
"compressed": False,
|
||||
"graphical": False,
|
||||
"chars": tuple(),
|
||||
"chars": tuple,
|
||||
}
|
||||
|
||||
if not data:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import asyncio
|
||||
import functools
|
||||
import logging
|
||||
import time
|
||||
from typing import Union
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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"),
|
||||
|
|
Loading…
Reference in a new issue