MCPcopy Index your code
hub / github.com/python-telegram-bot/python-telegram-bot / ChecklistTask

Class ChecklistTask

src/telegram/_checklists.py:39–172  ·  view source on GitHub ↗

Describes a task in a checklist. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`id` is equal. .. versionadded:: 22.3 Args: id (:obj:`int`): Unique identifier of the task. text (:obj:`s

Source from the content-addressed store, hash-verified

37
38
39class ChecklistTask(TelegramObject):
40 """
41 Describes a task in a checklist.
42
43 Objects of this class are comparable in terms of equality.
44 Two objects of this class are considered equal, if their :attr:`id` is equal.
45
46 .. versionadded:: 22.3
47
48 Args:
49 id (:obj:`int`): Unique identifier of the task.
50 text (:obj:`str`): Text of the task.
51 text_entities (Sequence[:class:`telegram.MessageEntity`], optional): Special
52 entities that appear in the task text.
53 completed_by_user (:class:`telegram.User`, optional): User that completed the task; omitted
54 if the task wasn't completed
55 completed_by_chat (:class:`telegram.Chat`, optional): Chat that completed the task; omitted
56 if the task wasn't completed by a chat
57
58 .. versionadded:: 22.6
59 completion_date (:class:`datetime.datetime`, optional): Point in time when
60 the task was completed; :attr:`~telegram.constants.ZERO_DATE` if the task wasn't
61 completed
62
63 |datetime_localization|
64
65 Attributes:
66 id (:obj:`int`): Unique identifier of the task.
67 text (:obj:`str`): Text of the task.
68 text_entities (Tuple[:class:`telegram.MessageEntity`]): Optional. Special
69 entities that appear in the task text.
70 completed_by_user (:class:`telegram.User`): Optional. User that completed the task; omitted
71 if the task wasn't completed
72 completed_by_chat (:class:`telegram.Chat`): Optional. Chat that completed the task; omitted
73 if the task wasn't completed by a chat
74
75 .. versionadded:: 22.6
76 completion_date (:class:`datetime.datetime`): Optional. Point in time when
77 the task was completed; :attr:`~telegram.constants.ZERO_DATE` if the task wasn't
78 completed
79
80 |datetime_localization|
81 """
82
83 __slots__ = (
84 "completed_by_chat",
85 "completed_by_user",
86 "completion_date",
87 "id",
88 "text",
89 "text_entities",
90 )
91
92 def __init__(
93 self,
94 id: int, # pylint: disable=redefined-builtin
95 text: str,
96 text_entities: Sequence[MessageEntity] | None = None,

Callers 7

checklist_taskFunction · 0.90
test_equalityMethod · 0.90
ChecklistTestBaseClass · 0.90
test_equalityMethod · 0.90
test_equalityMethod · 0.90

Calls

no outgoing calls

Tested by 4

checklist_taskFunction · 0.72
test_equalityMethod · 0.72
test_equalityMethod · 0.72
test_equalityMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…