<commit_before>from django.core.exceptions import ImproperlyConfigured

from actstream import settings
from actstream.signals import action
from actstream.compat_apps import AppConfig


class ActstreamConfig(AppConfig):
    name = 'actstream'

    def ready(self):
        from actstream.actions import action_handler
        action.connect(action_handler, dispatch_uid='actstream.models')
        action_class = self.get_model('action')

        if settings.USE_JSONFIELD:
            try:
                from jsonfield.fields import JSONField
            except ImportError:
                raise ImproperlyConfigured('You must have django-jsonfield installed '
                                           'if you wish to use a JSONField on your actions')<commit_msg>fix flake error in apps.py<commit_after>from django.core.exceptions import ImproperlyConfigured

from actstream import settings
from actstream.signals import action
from actstream.compat_apps import AppConfig


class ActstreamConfig(AppConfig):
    name = 'actstream'

    def ready(self):
        from actstream.actions import action_handler
        action.connect(action_handler, dispatch_uid='actstream.models')
        action_class = self.get_model('action')

        if settings.USE_JSONFIELD:
            try:
                from jsonfield.fields import JSONField
            except ImportError:
                raise ImproperlyConfigured(
                    'You must have django-jsonfield installed '
                    'if you wish to use a JSONField on your actions'
                )
{'fraction_non_alphanumeric': 0.05555555555555555, 'fraction_numerical': 0.0, 'mean_word_length': 2.5213483146067417, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4846481', 'n_tokens_mistral': 386, 'n_tokens_neox': 372, 'n_words': 114}