<commit_before>import os
import re
import shutil
import yaml

import bsource
import core
import exception
import helpers
from utils.cmd import git
from utils import log


def check_file(stream):
    if isinstance(stream, basestring):
        stream = file(stream, 'r')
    data = yaml.load(stream)
    return core.Update(data)


def check_files(*files, **kwargs):
    good = []
    fails = []
    avail = kwargs.get('available', False)<commit_msg>Ensure only one "builds:" section<commit_after>import os
import re
import shutil
import yaml

import bsource
import core
import exception
import helpers
from utils.cmd import git
from utils import log


def check_file(stream):
    if isinstance(stream, basestring):
        stream = file(stream, 'r')
    content = stream.read()
    if len(re.findall('^builds:', content, flags=re.M)) > 1:
        raise exception.InvalidUpdateStructure(
            msg="Multiple 'builds:' in an update file. Oh, come on.")
    data = yaml.load(content)
    return core.Update(data)


def check_files(*files, **kwargs):
    good = []
    fails = []
    avail = kwargs.get('available', False)
{'fraction_non_alphanumeric': 0.10873440285204991, 'fraction_numerical': 0.00089126559714795, 'mean_word_length': 3.659751037344398, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1835537', 'n_tokens_mistral': 344, 'n_tokens_neox': 342, 'n_words': 109}