當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。