wide_format.py 文件源码

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

项目:sphinx-jsonschema 作者: lnoor 项目源码 文件源码
def _simpletype(self, schema):
        rows = []

        if 'title' in schema and self.nesting > 1:
            rows.append(self._line(self._cell('*'+schema['title']+'*')))

        if 'description' in schema:
            rows.append(self._line(self._cell(schema['description'])))

        if 'type' in schema:
            rows.append(self._line(self._cell('type'), self._decodetype(schema['type'])))

        if 'enum' in schema:
            rows.append(self._line(self._cell('enum'), self._cell(', '.join([str_unicode(e) for e in schema['enum']]))))

        rows.extend(self._kvpairs(schema, self.KV_SIMPLE))
        return rows
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号