directives.py 文件源码

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

项目:sphinx-js 作者: erikrose 项目源码 文件源码
def auto_class_directive_bound_to_app(app):
    class AutoClassDirective(JsDirective):
        """js:autoclass directive, which spits out a js:class directive

        Takes a single argument which is a JS class name combined with an
        optional formal parameter list for the constructor, all mashed together
        in a single string.

        """
        option_spec = JsDirective.option_spec.copy()
        option_spec.update({
            'members': lambda members: [m.strip() for m in members.split(',')]
                                       if members else [],
            'exclude-members': _members_to_exclude,
            'private-members': flag})

        def run(self):
            return AutoClassRenderer.from_directive(self, app).rst_nodes()

    return AutoClassDirective
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号