remove type checking protocol from runtime

This commit is contained in:
Hinrich Mahler 2024-12-30 15:50:56 +01:00
parent 56cbe650af
commit 7c00b03b60

View file

@ -31,6 +31,8 @@ from telegram._telegramobject import TelegramObject
from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING:
from typing import type_check_only
from telegram import Bot, FileCredentials
T = TypeVar("T")
@ -69,7 +71,9 @@ def parse_lpo_and_dwpp(
Tele_co = TypeVar("Tele_co", bound=TelegramObject, covariant=True)
TeleCrypto_co = TypeVar("TeleCrypto_co", bound="HasDecryptMethod", covariant=True)
if TYPE_CHECKING:
@type_check_only
class HasDecryptMethod(Protocol):
__slots__ = ()