Source code for atlas_doc_parser.nodes.node_task_item
# -*- coding: utf-8 -*-importtypingasTimportdataclassesfromfunc_args.apiimportREQ,OPTfrom..type_enumimportTypeEnumfrom..mark_or_nodeimportBase,BaseNodefrom..markdown_helpersimportcontent_to_markdownifT.TYPE_CHECKING:# pragma: no coverfrom.node_textimportNodeTextfrom.node_dateimportNodeDatefrom.node_emojiimportNodeEmojifrom.node_hard_breakimportNodeHardBreakfrom.node_inline_cardimportNodeInlineCardfrom.node_mentionimportNodeMentionfrom.node_statusimportNodeStatusfrom.node_placeholderimportNodePlaceholderfrom.node_inline_extensionimportNodeInlineExtensionfrom.node_media_inlineimportNodeMediaInline
[docs]@dataclasses.dataclass(frozen=True)classNodeTaskItemAttrs(Base):""" Attributes for :class:`NodeTaskItem`. :param localId: A unique identifier for the task item. :param state: The state of the task item. Either "TODO" or "DONE". """localId:str=REQstate:T.Literal["TODO","DONE"]=REQ
[docs]@dataclasses.dataclass(frozen=True)classNodeTaskItem(BaseNode):""" A single task/checkbox item within a taskList. The taskItem node represents a checkable item in a task list. Each task item has a unique localId and a state indicating whether the task is complete ("DONE") or incomplete ("TODO"). """type:str=TypeEnum.taskItem.valueattrs:NodeTaskItemAttrs=REQcontent:list[T.Union["NodeText","NodeDate","NodeEmoji","NodeHardBreak","NodeInlineCard","NodeMention","NodeStatus","NodePlaceholder","NodeInlineExtension","NodeMediaInline",]]=OPT