Skip to content

Commit

Permalink
pyrofork: Refactor PollOption
Browse files Browse the repository at this point in the history
Signed-off-by: wulan17 <[email protected]>
  • Loading branch information
wulan17 committed Nov 29, 2024
1 parent efc0272 commit c22e349
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions pyrogram/types/messages_and_media/poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ async def _parse(
text=answer.text.text,
voter_count=voter_count,
data=answer.option,
entities=option_entities,
client=client
entities=option_entities
)
)

Expand Down Expand Up @@ -217,8 +216,7 @@ async def _parse_update(
types.PollOption(
text="",
voter_count=result.voters,
data=result.option,
client=client
data=result.option
)
)

Expand Down
6 changes: 2 additions & 4 deletions pyrogram/types/messages_and_media/poll_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ class PollOption(Object):
"""

def __init__(
self,
*,
client: "pyrogram.Client" = None,
self: "pyrogram.Client",
text: str,
voter_count: int = 0,
data: bytes = None,
entities: Optional[List["pyrogram.types.MessageEntity"]] = None,
):
super().__init__(client)
super().__init__(self)

self.text = text
self.voter_count = voter_count
Expand Down

0 comments on commit c22e349

Please sign in to comment.