<commit_before>from optparse import make_option

from django.conf import settings
from django.core.management import call_command
from django.core.management.base import BaseCommand


class Command(BaseCommand):
    args = ''
    help = "Call 'migrate' for each configured database"

    option_list = BaseCommand.option_list + (
        make_option('--noinput', action='store_false', dest='interactive', default=True,
            help='Tells Django to NOT prompt the user for input of any kind.'),
        make_option('--fake', action='store_true', dest='fake', default=False,
            help='Mark migrations as run without actually running them'),
        make_option('--list', '-l', action='store_true', dest='list', default=False,
            help='Show a list of all known migrations and which are applied'),
    )

    def handle(self, *args, **options):
        for db_alias in settings.DATABASES.keys():
            print '\n======================= Migrating DB: {} ======================='.format(db_alias)
            call_command(
                'migrate',
                *args,
                database=db_alias,
                interactive=options['interactive'],
                fake=options['fake'],
                list=options['list'],
            )<commit_msg>fix syntax<commit_after>from optparse import make_option

from django.conf import settings
from django.core.management import call_command
from django.core.management.base import BaseCommand


class Command(BaseCommand):
    args = ''
    help = "Call 'migrate' for each configured database"

    option_list = BaseCommand.option_list + (
        make_option('--noinput', action='store_false', dest='interactive', default=True,
            help='Tells Django to NOT prompt the user for input of any kind.'),
        make_option('--fake', action='store_true', dest='fake', default=False,
            help='Mark migrations as run without actually running them'),
        make_option('--list', '-l', action='store_true', dest='list', default=False,
            help='Show a list of all known migrations and which are applied'),
    )

    def handle(self, *args, **options):
        for db_alias in settings.DATABASES.keys():
            print '\n======================= Migrating DB: {} ======================='.format(db_alias)
            call_command(
                'migrate',
                *args,
                **dict(
                    database=db_alias,
                    interactive=options['interactive'],
                    fake=options['fake'],
                    list=options['list'],
                )
            )
{'fraction_non_alphanumeric': 0.14509354715540282, 'fraction_numerical': 0.0, 'mean_word_length': 2.5405405405405403, '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': '4326614', 'n_tokens_mistral': 672, 'n_tokens_neox': 650, 'n_words': 186}