__init__.py 文件源码

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

项目:aiohttp_swaggerify 作者: dchaplinsky 项目源码 文件源码
def parse_docstring(s):
    title = []
    description = []
    strings = inspect.cleandoc(s).split("\n")

    for i, x in enumerate(strings):
        if x:
            title.append(x)
        else:
            if title:
                description = strings[i + 1:]
                break
            else:
                continue

    return {
        "title": " ".join(title),
        "description": " ".join(description)
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号