Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Generate a one-line summary of a docstring.

        def summaryDoc(obj):
    """Generate a one-line summary of a docstring."""
    if isinstance(obj, model.Package):
        obj = obj.contents['__init__']
    doc = obj.docstring
    if not doc or not doc.strip():
        return 'Undocumented'
    # Return the first line of the docstring (that actually has stuff)
    for doc in doc.splitlines():
        if doc.strip():
            return doc2html(obj, doc)
        


src/p/y/pydoctor-0.5/pydoctor/test/test_formatting.py   pydoctor(Download)
def test_summaryDoc():
    docco = model.Documentable(None, 'threadz', 'Woot\nYeah')
    assert html.summaryDoc(docco) == html.doc2html(docco, 'Woot')
 
def test_boringDocstring():