<commit_before>from docextractor import model
from os.path import join as opj
import os, inspect, shutil

try:
    from epydoc.markup import epytext
    EPYTEXT = True
except:
    EPYTEXT = False

def link(o):
    return o.fullName()+'.html'

def linkto(o, label=None):
    if label is None:
        label = o.fullName()
    return '<a href="%s">%s</a>'%(link(o), label)

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 doc
<commit_msg>style the "Undocumented" in the one line summaries too.<commit_after>from docextractor import model
from os.path import join as opj
import os, inspect, shutil

try:
    from epydoc.markup import epytext
    EPYTEXT = True
except:
    EPYTEXT = False

def link(o):
    return o.fullName()+'.html'

def linkto(o, label=None):
    if label is None:
        label = o.fullName()
    return '<a href="%s">%s</a>'%(link(o), label)

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 '<span class="undocumented">Undocumented</span>'
    # Return the first line of the docstring (that actually has stuff)
    for doc in doc.splitlines():
        if doc.strip():
            return doc

{'fraction_non_alphanumeric': 0.11717791411042945, 'fraction_numerical': 0.0, 'mean_word_length': 2.95873786407767, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7108745', 'n_tokens_mistral': 521, 'n_tokens_neox': 516, 'n_words': 177}