当前位置: 首页>>代码示例>>Python>>正文


Python docscrape_sphinx.SphinxDocString方法代码示例

本文整理汇总了Python中docscrape_sphinx.SphinxDocString方法的典型用法代码示例。如果您正苦于以下问题:Python docscrape_sphinx.SphinxDocString方法的具体用法?Python docscrape_sphinx.SphinxDocString怎么用?Python docscrape_sphinx.SphinxDocString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在docscrape_sphinx的用法示例。


在下文中一共展示了docscrape_sphinx.SphinxDocString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: mangle_signature

# 需要导入模块: import docscrape_sphinx [as 别名]
# 或者: from docscrape_sphinx import SphinxDocString [as 别名]
def mangle_signature(app, what, name, obj, options, sig, retann):
    # Do not try to inspect classes that don't define `__init__`
    if (inspect.isclass(obj) and
        (not hasattr(obj, '__init__') or
            'initializes x; see ' in pydoc.getdoc(obj.__init__))):
        return '', ''

    if not (isinstance(obj, collections.Callable) or
            hasattr(obj, '__argspec_is_invalid_')):
        return

    if not hasattr(obj, '__doc__'):
        return

    doc = SphinxDocString(pydoc.getdoc(obj))
    if doc['Signature']:
        sig = re.sub(sixu("^[^(]*"), sixu(""), doc['Signature'])
        return sig, sixu('') 
开发者ID:AthenaEPI,项目名称:dmipy,代码行数:20,代码来源:numpydoc.py

示例2: mangle_signature

# 需要导入模块: import docscrape_sphinx [as 别名]
# 或者: from docscrape_sphinx import SphinxDocString [as 别名]
def mangle_signature(app, what, name, obj, options, sig, retann):
    # Do not try to inspect classes that don't define `__init__`
    if (inspect.isclass(obj) and
        'initializes x; see ' in pydoc.getdoc(obj.__init__)):
        return '', ''

    if not (callable(obj) or hasattr(obj, '__argspec_is_invalid_')): return
    if not hasattr(obj, '__doc__'): return

    doc = SphinxDocString(pydoc.getdoc(obj))
    if doc['Signature']:
        sig = re.sub("^[^(]*", "", doc['Signature'])
        return sig, '' 
开发者ID:kdart,项目名称:pycopia,代码行数:15,代码来源:numpydoc.py

示例3: mangle_signature

# 需要导入模块: import docscrape_sphinx [as 别名]
# 或者: from docscrape_sphinx import SphinxDocString [as 别名]
def mangle_signature(app, what, name, obj, options, sig, retann):
    # Do not try to inspect classes that don't define `__init__`
    if (inspect.isclass(obj) and
        (not hasattr(obj, '__init__') or
         'initializes x; see ' in pydoc.getdoc(obj.__init__))):
        return '', ''

    if not (callable(obj) or hasattr(obj, '__argspec_is_invalid_')): return
    if not hasattr(obj, '__doc__'): return

    doc = SphinxDocString(pydoc.getdoc(obj))
    if doc['Signature']:
        sig = re.sub(u"^[^(]*", u"", doc['Signature'])
        return sig, u'' 
开发者ID:comp-imaging,项目名称:ProxImaL,代码行数:16,代码来源:numpydoc.py

示例4: mangle_signature

# 需要导入模块: import docscrape_sphinx [as 别名]
# 或者: from docscrape_sphinx import SphinxDocString [as 别名]
def mangle_signature(app, what, name, obj, options, sig, retann):
    # Do not try to inspect classes that don't define `__init__`
    if (inspect.isclass(obj) and
        (not hasattr(obj, '__init__') or
        'initializes x; see ' in pydoc.getdoc(obj.__init__))):
        return '', ''

    if not (isinstance(obj, collections.Callable) or hasattr(obj, '__argspec_is_invalid_')): return
    if not hasattr(obj, '__doc__'): return

    doc = SphinxDocString(pydoc.getdoc(obj))
    if doc['Signature']:
        sig = re.sub(sixu("^[^(]*"), sixu(""), doc['Signature'])
        return sig, sixu('') 
开发者ID:erichson,项目名称:DMDpack,代码行数:16,代码来源:numpydoc.py


注:本文中的docscrape_sphinx.SphinxDocString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。