<commit_before>from __future__ import print_function, unicode_literals

import sys

from django.core.management.base import BaseCommand

from candidates.models import check_paired_models


class Command(BaseCommand):

    def handle(self, *args, **options):
        errors = check_paired_models()
        if errors:
            for error in errors:
                print(error)
            sys.exit(1)<commit_msg>Add check_membership_elections_consistent to the data checking command<commit_after>from __future__ import print_function, unicode_literals

import sys

from django.core.management.base import BaseCommand

from candidates.models import (
    check_paired_models, check_membership_elections_consistent)


class Command(BaseCommand):

    def handle(self, *args, **options):
        errors = check_paired_models() + check_membership_elections_consistent()
        if errors:
            for error in errors:
                print(error)
            sys.exit(1)
{'fraction_non_alphanumeric': 0.06591143151390319, 'fraction_numerical': 0.0020597322348094747, 'mean_word_length': 3.4383561643835616, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3874199', 'n_tokens_mistral': 269, 'n_tokens_neox': 252, 'n_words': 69}