From ca02f6b0c89f809f25082ac204a153b1462db374 Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Sat, 19 Oct 2024 13:42:57 -0500 Subject: [PATCH] Use typing.Pattern --- netkan/netkan/notifications.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netkan/netkan/notifications.py b/netkan/netkan/notifications.py index c2006e8..7a71dbf 100644 --- a/netkan/netkan/notifications.py +++ b/netkan/netkan/notifications.py @@ -2,7 +2,7 @@ import sys import re import logging -from typing import Iterable, Type, Optional +from typing import Iterable, Type, Optional, Pattern from types import TracebackType import discord @@ -21,7 +21,7 @@ def catch_all(type_: Type[BaseException], value: BaseException, traceback: Optio class DiscordLogHandler(logging.Handler): def __init__(self, webhook_id: str, webhook_token: str, - logger_filter: re.Pattern) -> None: + logger_filter: Pattern) -> None: super().__init__() self.webhook = discord.Webhook.partial(webhook_id, webhook_token, adapter=discord.RequestsWebhookAdapter())