def register_assets(spec):
    for name, elements in spec.iteritems():
        name, kind = path.splitext(name)
        rules = get_rules(kind)
        filemap = defaultdict(list)
        for element in yield_expanded(elements):
            _, extension = path.splitext(element)
            if isinstance(element, Depends):
                rules.kwargs[extension]['depends'] = element
                continue
            filemap[extension].append(element)

        contents = list(filemap.get(kind, []))
        for compiled_extension, compiled_filters in rules['compilers'].iteritems():
            if compiled_extension in filemap:
                kwargs = rules.kwargs.get(compiled_extension, {})
                contents.append(Bundle(*filemap[compiled_extension], filters=compiled_filters, debug=False,
                                output="gen/%s.%%(version)s%s%s" % (name, compiled_extension, kind), **kwargs))
        assets.register(
            name + kind,
            Bundle(*contents, filters=rules.final_filter, output=(name, kind) % "gen/%s.%%(version)s%s",
                   **rules.kwargs[kind])
        )
dataset/ETHPy150Open fusic-com/flask-todo/backend/assets.py/register_assets/swapped operands of `%`