click_autodoc.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:cuvner 作者: meejah 项目源码 文件源码
def write_dl(self, rows, col_max=30, col_spacing=2):
        """Writes a definition list into the buffer.  This is how options
        and commands are usually formatted.

        :param rows: a list of two item tuples for the terms and values.
        :param col_max: the maximum width of the first column.
        :param col_spacing: the number of spaces between the first and
                            second column.
        """
        rows = list(rows)
        dl = nodes.bullet_list()
        self._node.append(dl)
        for (option, help_text) in rows:
            item = nodes.list_item()
            dl.append(item)
            p = nodes.paragraph()
            p.append(nodes.literal('', option))
            p.append(nodes.Text(': '))
            p.append(nodes.Text(help_text))
            item.append(p)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号