FmtStr repr is build by concatenating these.
506531
def repr_part(self):
        """"""
        def pp_att(att):
            if att == 'fg': return FG_NUMBER_TO_COLOR[self.atts[att]]
            elif att == 'bg': return 'on_' + BG_NUMBER_TO_COLOR[self.atts[att]]
            else: return att
        atts_out = dict((k, v) for (k, v) in self.atts.items() if v)
        return (''.join(pp_att(att)+'(' for att in sorted(atts_out))
                + (repr(self.s) if PY3 else repr(self.s)[1:]) + ')'*len(atts_out))
150909
def _tuple_repr(data):
    """"""
    if len(data) == 1:
        return "(%s,)" % rpr(data[0])
    else:
        return "(%s)" % ", ".join([rpr(x) for x in data])
1136847
def concatenate_and_rewrite(self, paths, output_filename, variant=None):
        """"""
        stylesheets = []
        for path in paths:
            def reconstruct(match):
                quote = match.group(1) or ''
                asset_path = match.group(2)
                if NON_REWRITABLE_URL.match(asset_path):
                    return "url(%s%s%s)" % (quote, asset_path, quote)
                asset_url = self.construct_asset_path(asset_path, path,
                                                      output_filename, variant)
                return "url(%s)" % asset_url
            content = self.read_text(path)
            # content needs to be unicode to avoid explosions with non-ascii chars
            content = re.sub(URL_DETECTOR, reconstruct, content)
            stylesheets.append(content)
        return '\n'.join(stylesheets)
570971
def repr2(obj_, **kwargs):
    
    kwargs['nl'] = kwargs.pop('nl', kwargs.pop('newlines', False))
    val_str = _make_valstr(**kwargs)
    return val_str(obj_)
737567
def merge(assembled_gtfs, ref_file, gtf_file, num_cores, data):
    
    assembled_file = tempfile.NamedTemporaryFile(delete=False).name
    with open(assembled_file, "w") as temp_handle:
        for assembled in assembled_gtfs:
            temp_handle.write(assembled + "\n")
    out_dir = os.path.join("assembly", "cuffmerge")
    merged_file = os.path.join(out_dir, "merged.gtf")
    out_file = os.path.join(out_dir, "assembled.gtf")
    if file_exists(out_file):
        return out_file
    if not file_exists(merged_file):
        with file_transaction(data, out_dir) as tmp_out_dir:
            cmd = ("cuffmerge -o {tmp_out_dir} --ref-gtf {gtf_file} "
                   "--num-threads {num_cores} --ref-sequence {ref_file} "
                   "{assembled_file}")
            cmd = cmd.format(**locals())
            message = ("Merging the following transcript assemblies with "
                       "Cuffmerge: %s" % ", ".join(assembled_gtfs))
            do.run(cmd, message)
    clean, _ = clean_assembly(merged_file)
    fixed = fix_cufflinks_attributes(gtf_file, clean, data)
    classified = annotate_gtf.annotate_novel_coding(fixed, gtf_file, ref_file,
                                                    data)
    filtered = annotate_gtf.cleanup_transcripts(classified, gtf_file, ref_file)
    shutil.move(filtered, out_file)
    return out_file
551160
def _merge_extra_filerefs(*args):
    '''
    
    '''
    ret = []
    for arg in args:
        if isinstance(arg, six.string_types):
            if arg:
                ret.extend(arg.split(','))
        elif isinstance(arg, list):
            if arg:
                ret.extend(arg)
    return ','.join(ret)
302012
def build_attrs(self, base_attrs, extra_attrs=None, **kwargs):
        

        attrs = dict(base_attrs, **kwargs)
        if extra_attrs:
            attrs.update(extra_attrs)
        return attrs
1011580
public void repr(StringBuilder buf, String sep) {
    if (style != null) {
      buf.append("style=").append(style);
    }
    super.repr(buf, sep);
  }
743853
def _prt_txt_hdr(prt, prtfmt):
    """"""
    tblhdrs = get_fmtfldsdict(prtfmt)
    # If needed, reformat for format_string for header, which has strings, not floats.
    hdrfmt = re.sub(r':(\d+)\.\S+}', r':\1}', prtfmt)
    hdrfmt = re.sub(r':(0+)(\d+)}', r':\2}', hdrfmt)
    prt.write("#{}".format(hdrfmt.format(**tblhdrs)))
1171775
def _make_repr(attrs, ns):
    
    attr_names = tuple(a.name for a in attrs if a.repr)

    def __repr__(self):
        """
        Automatically created by attrs.
        """
        try:
            working_set = _already_repring.working_set
        except AttributeError:
            working_set = set()
            _already_repring.working_set = working_set

        if id(self) in working_set:
            return "..."
        real_cls = self.__class__
        if ns is None:
            qualname = getattr(real_cls, "__qualname__", None)
            if qualname is not None:
                class_name = qualname.rsplit(">.", 1)[-1]
            else:
                class_name = real_cls.__name__
        else:
            class_name = ns + "." + real_cls.__name__

        # Since 'self' remains on the stack (i.e.: strongly referenced) for the
        # duration of this call, it's safe to depend on id(...) stability, and
        # not need to track the instance and therefore worry about properties
        # like weakref- or hash-ability.
        working_set.add(id(self))
        try:
            result = [class_name, "("]
            first = True
            for name in attr_names:
                if first:
                    first = False
                else:
                    result.append(", ")
                result.extend((name, "=", repr(getattr(self, name, NOTHING))))
            return "".join(result) + ")"
        finally:
            working_set.remove(id(self))

    return __repr__
480182
def _combine_attr_fast_update(self, attr, typ):
        '''

        '''
        values = dict(getattr(self, attr, {}))
        
        for base in self._class_data.bases:
            vals = dict(getattr(base, attr, {}))
            preserve_attr_data(vals, values)
            values = combine(vals, values)
            
        setattr(self, attr, typ(values))
969350
def repr_args(args):
    
    res = []
    for x in args:
        if isinstance(x, tuple) and len(x) == 2:
            key, value = x
            # todo: exclude this key if value is its default
            res += ["%s=%s" % (key, repr_arg(value))]
        else:
            res += [repr_arg(x)]
    return ', '.join(res)
1335326
def _construct_regex(cls, fmt):
        """"""
        return re.compile(fmt.format(**vars(cls)), flags=re.U)
1177014
def passthrough_repl(self, inputstring, **kwargs):
        """"""
        out = []
        index = None
        for c in append_it(inputstring, None):
            try:

                if index is not None:
                    if c is not None and c in nums:
                        index += c
                    elif c == unwrapper and index:
                        ref = self.get_ref("passthrough", index)
                        out.append(ref)
                        index = None
                    elif c != "\\" or index:
                        out.append("\\" + index)
                        if c is not None:
                            out.append(c)
                        index = None
                elif c is not None:
                    if c == "\\":
                        index = ""
                    else:
                        out.append(c)

            except CoconutInternalException as err:
                complain(err)
                if index is not None:
                    out.append(index)
                    index = None
                out.append(c)

        return "".join(out)
67045
def tmpl_replchars(text, replace, chars):
        
        for char in chars:
            text = text.replace(char, replace)
        return text
1030087
def dump(bqm, fp, vartype_header=False):
    """"""
    for triplet in _iter_triplets(bqm, vartype_header):
        fp.write('%s\n' % triplet)
1157971
def __registerSeqStr():
    """"""
    _SeqStr = lambda self: (self and "[%s]" % (", ".join(map(repr, self)))) or "[]"
    _SeqRepr = lambda self: (self and "[%s]" % (", ".join(map(repr, self)))) or "[]"

    seqs = (StdStringVector, StdLongVector, CommandInfoList,
            AttributeInfoList, AttributeInfoListEx, PipeInfoList,
            DeviceDataHistoryList,
            GroupReplyList, GroupAttrReplyList, GroupCmdReplyList,
            DbData, DbDevInfos, DbDevExportInfos, DbDevImportInfos, DbHistoryList)

    for seq in seqs:
        seq.__str__ = _SeqStr
        seq.__repr__ = _SeqRepr