Skip to content

Commit c454c7b

Browse files
Merge pull request eternnoir#2165 from eternnoir/coder2020official-patch-3
Added typehints for recent bot api 7.0
2 parents bd31596 + b9291cb commit c454c7b

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

telebot/types.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8961,8 +8961,8 @@ def de_json(cls, json_string):
89618961
return cls(**obj)
89628962

89638963
def __init__(self, chat, boost, **kwargs):
8964-
self.chat = chat
8965-
self.boost = boost
8964+
self.chat: Chat = chat
8965+
self.boost: ChatBoost = boost
89668966

89678967

89688968
class ChatBoostRemoved(JsonDeserializable):
@@ -8997,10 +8997,10 @@ def de_json(cls, json_string):
89978997
return cls(**obj)
89988998

89998999
def __init__(self, chat, boost_id, remove_date, source, **kwargs):
9000-
self.chat = chat
9001-
self.boost_id = boost_id
9002-
self.remove_date = remove_date
9003-
self.source = source
9000+
self.chat: Chat = chat
9001+
self.boost_id: str = boost_id
9002+
self.remove_date: int = remove_date
9003+
self.source: ChatBoostSource = source
90049004

90059005

90069006
class ChatBoostSource(ABC, JsonDeserializable):
@@ -9059,8 +9059,8 @@ def de_json(cls, json_string):
90599059
return cls(**obj)
90609060

90619061
def __init__(self, source, user, **kwargs):
9062-
self.source = source
9063-
self.user = user
9062+
self.source: str = source
9063+
self.user: User = user
90649064

90659065

90669066
# noinspection PyUnresolvedReferences
@@ -9089,8 +9089,8 @@ def de_json(cls, json_string):
90899089
return cls(**obj)
90909090

90919091
def __init__(self, source, user, **kwargs):
9092-
self.source = source
9093-
self.user = user
9092+
self.source: str = source
9093+
self.user: User = user
90949094

90959095

90969096
# noinspection PyUnresolvedReferences
@@ -9125,10 +9125,10 @@ def de_json(cls, json_string):
91259125
return cls(**obj)
91269126

91279127
def __init__(self, source, giveaway_message_id, user=None, is_unclaimed=None, **kwargs):
9128-
self.source = source
9129-
self.giveaway_message_id = giveaway_message_id
9130-
self.user = user
9131-
self.is_unclaimed = is_unclaimed
9128+
self.source: str = source
9129+
self.giveaway_message_id: int = giveaway_message_id
9130+
self.user: User = user
9131+
self.is_unclaimed: bool = is_unclaimed
91329132

91339133

91349134
class ChatBoost(JsonDeserializable):
@@ -9175,9 +9175,9 @@ def de_json(cls, json_string):
91759175
return cls(**obj)
91769176

91779177
def __init__(self, boost_id, add_date, expiration_date, source, **kwargs):
9178-
self.boost_id = boost_id
9179-
self.add_date = add_date
9180-
self.expiration_date = expiration_date
9178+
self.boost_id: str = boost_id
9179+
self.add_date: int = add_date
9180+
self.expiration_date: int = expiration_date
91819181
self.source: ChatBoostSource = source
91829182

91839183

@@ -9234,9 +9234,9 @@ def de_json(cls, json_string):
92349234
return cls(**obj)
92359235

92369236
def __init__(self, chat, message_id, date, **kwargs):
9237-
self.chat = chat
9238-
self.message_id = message_id
9239-
self.date = date
9237+
self.chat: Chat = chat
9238+
self.message_id: int = message_id
9239+
self.date: int = date
92409240

92419241
@staticmethod
92429242
def __universal_deprecation(property_name):

0 commit comments

Comments
 (0)