File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,20 @@ def __init__(
158158 )
159159
160160 def __str__ (self ):
161+ """
162+ Renders the checklist as a markdown string. Checklists
163+ function very similarly to unorded lists, but require
164+ additional information about the status of each task
165+ (i.e., whether it is checked or not).
166+
167+ .. code-block:: markdown
168+
169+ - [ ] Do reading
170+ - [X] Do writing
171+
172+ :return:
173+ the list as a markdown string
174+ """
161175 output = []
162176 i = 1
163177 for item in self ._items :
@@ -178,7 +192,7 @@ def __str__(self):
178192 i += 1
179193
180194 checklist = "\n " .join (output )
181- logger .debug ("Rendered markdown list : %r" , checklist )
195+ logger .debug ("Rendered checklist : %r" , checklist )
182196 return checklist
183197
184198 def __repr__ (self ) -> str :
You can’t perform that action at this time.
0 commit comments