Skip to content

Commit

Permalink
add Chat type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
z44d committed Sep 27, 2024
1 parent 114489f commit bca0322
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tgram/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@
]

ParseMode = _Literal["Markdown", "MarkdownV2", "HTML"]
ChatType = _Literal["private", "group", "supergroup", "channel"]

__all__ = [
"Animation",
Expand Down Expand Up @@ -511,4 +512,5 @@
"WebhookInfo",
"WriteAccessAllowed",
"ParseMode",
"ChatType",
]
2 changes: 1 addition & 1 deletion tgram/types/_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Chat(Type_, bound.ChatB):
def __init__(
self,
id: "int" = None,
type: "str" = None,
type: "tgram.types.ChatType" = None,
title: "str" = None,
username: "str" = None,
first_name: "str" = None,
Expand Down
2 changes: 1 addition & 1 deletion tgram/types/_chat_full_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class ChatFullInfo(Type_, bound.ChatB):
def __init__(
self,
id: "int" = None,
type: "str" = None,
type: "tgram.types.ChatType" = None,
accent_color_id: "int" = None,
max_reaction_count: "int" = None,
title: "str" = None,
Expand Down
2 changes: 1 addition & 1 deletion tgram/types/_inline_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(
from_user: "tgram.types.User" = None,
query: "str" = None,
offset: "str" = None,
chat_type: "str" = None,
chat_type: "tgram.types.ChatType" = None,
location: "tgram.types.Location" = None,
me: "tgram.TgBot" = None,
json: "dict" = None,
Expand Down

0 comments on commit bca0322

Please sign in to comment.