Verifies that the pylint score is above a given threshold.

    :param new_data:
    :param old_data:
    :return:

def above_score_threshold(new_data, old_data, strict=False, threshold=PYLINT_SCORE_THRESHOLD):
    """
    Verifies that the pylint score is above a given threshold.

    :param new_data:
    :param old_data:
    :return:
    """
    success = True
    score = 0
    message = ''
    if strict:
        for fscore, fname in new_data['scores']:
            if fscore < threshold:
                success = False
                score = -1
                message += "File {} score ({}) below threshold {}\n".format(fname, fscore, threshold)

        return success, score, message

    else:
        if new_data['average'] < threshold:
            success = False
            message = "Failed! Average pylint score ({})" \
                      " below threshold (9)!".format(new_data['average'])
            score = -1

    return success, score, message