Skip to content

Commit

Permalink
Suppress warnings and fix forward_origin
Browse files Browse the repository at this point in the history
  • Loading branch information
Badiboy committed Jul 8, 2024
1 parent b73f51b commit 805b166
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions telebot/custom_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from telebot import types




class SimpleCustomFilter(ABC):
"""
Simple Custom Filter base class.
Expand Down Expand Up @@ -311,7 +309,7 @@ def check(self, message):
"""
:meta private:
"""
return message.forward_date is not None
return message.forward_origin is not None


class IsReplyFilter(SimpleCustomFilter):
Expand Down
6 changes: 6 additions & 0 deletions telebot/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -10111,6 +10111,7 @@ def __init__(self, type, **kwargs):


class RevenueWithdrawalState(JsonDeserializable):
# noinspection PyUnresolvedReferences
"""
This object describes the state of a revenue withdrawal operation. Currently, it can be one of
RevenueWithdrawalStatePending
Expand Down Expand Up @@ -10152,6 +10153,7 @@ class RevenueWithdrawalStatePending(RevenueWithdrawalState):
:rtype: :class:`RevenueWithdrawalStatePending`
"""

# noinspection PyPackageRequirements
def __init__(self, type, **kwargs):
self.type: str = type

Expand Down Expand Up @@ -10181,6 +10183,7 @@ class RevenueWithdrawalStateSucceeded(RevenueWithdrawalState):
:rtype: :class:`RevenueWithdrawalStateSucceeded`
"""

# noinspection PyPackageRequirements
def __init__(self, type, date, url, **kwargs):
self.type: str = type
self.date: int = date
Expand All @@ -10207,6 +10210,7 @@ class RevenueWithdrawalStateFailed(RevenueWithdrawalState):
:rtype: :class:`RevenueWithdrawalStateFailed`
"""

# noinspection PyPackageRequirements
def __init__(self, type, **kwargs):
self.type: str = type

Expand All @@ -10218,6 +10222,7 @@ def de_json(cls, json_string):


class TransactionPartner(JsonDeserializable):
# noinspection PyUnresolvedReferences
"""
This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of
TransactionPartnerFragment
Expand Down Expand Up @@ -10263,6 +10268,7 @@ class TransactionPartnerFragment(TransactionPartner):
"""

# noinspection PyPackageRequirements
def __init__(self, type, withdrawal_state=None, **kwargs):
self.type: str = type
self.withdrawal_state: Optional[RevenueWithdrawalState] = withdrawal_state
Expand Down

0 comments on commit 805b166

Please sign in to comment.