Skip to content

Commit 26865e6

Browse files
committed
Improve formatting
1 parent 12ed5fd commit 26865e6

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

cogs/startup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ async def on_ready(self) -> None:
5151
)
5252
discord_logging_handler.setLevel(logging.WARNING)
5353
discord_logging_handler.setFormatter(
54-
logging.Formatter("{levelname} | {message}", style="{"),
54+
logging.Formatter("{levelname} | {message}", style="{")
5555
)
5656

5757
logger.addHandler(discord_logging_handler)
5858

5959
else:
6060
logger.warning(
6161
"DISCORD_LOG_CHANNEL_WEBHOOK_URL was not set, "
62-
"so error logs will not be sent to the Discord log channel.",
62+
"so error logs will not be sent to the Discord log channel."
6363
)
6464

6565
try:

config.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ def __getitem__(self, item: str) -> "Any": # type: ignore[explicit-any] # noqa
137137
@classmethod
138138
def _setup_discord_log_channel_webhook(cls) -> "Logger":
139139
raw_discord_log_channel_webhook_url: str = os.getenv(
140-
"DISCORD_LOG_CHANNEL_WEBHOOK_URL",
141-
"",
140+
"DISCORD_LOG_CHANNEL_WEBHOOK_URL", ""
142141
)
143142

144143
if raw_discord_log_channel_webhook_url and (
@@ -157,14 +156,13 @@ def _setup_discord_log_channel_webhook(cls) -> "Logger":
157156

158157
if raw_discord_log_channel_webhook_url:
159158
discord_logging_handler: logging.Handler = DiscordHandler(
160-
service_name="TeX-Bot",
161-
webhook_url=raw_discord_log_channel_webhook_url,
159+
service_name="TeX-Bot", webhook_url=raw_discord_log_channel_webhook_url
162160
)
163161

164162
discord_logging_handler.setLevel(logging.WARNING)
165163

166164
discord_logging_handler.setFormatter(
167-
logging.Formatter("{levelname} | {message}", style="{"),
165+
logging.Formatter("{levelname} | {message}", style="{")
168166
)
169167

170168
webhook_config_logger.addHandler(discord_logging_handler)

0 commit comments

Comments
 (0)