<commit_before># -*- coding: utf-8 -*-
from django.conf import settings

from opps.articles.models import ArticleBox


def set_context_data(self, SUPER, **kwargs):
    context = super(SUPER, self).get_context_data(**kwargs)
    if len(self.article) >= 1:
        article = self.article[0]
        context['articleboxes'] = ArticleBox.objects.filter(
            channel=article.channel)
        if len(self.article) == 1:
            context['articleboxes'] = context['articleboxes'].filter(
                article=article)
        context['opps_channel'] = article.channel
        context['opps_channel_conf'] = settings.OPPS_CHANNEL_CONF.get(
            article.channel.slug, '')
    return context<commit_msg>clean set context data, articles utils<commit_after># -*- coding: utf-8 -*-
from django.conf import settings

from opps.articles.models import ArticleBox


def set_context_data(self, SUPER, **kwargs):
    context = super(SUPER, self).get_context_data(**kwargs)
    if len(self.article) >= 1:
        article = self.article[0]

        context['articleboxes'] = ArticleBox.objects.filter(
            channel=article.channel)
        if len(self.article) == 1:
            context['articleboxes'] = context['articleboxes'].filter(
                article=article)

        context['opps_channel'] = article.channel
        context['opps_channel_conf'] = settings.OPPS_CHANNEL_CONF.get(
            article.channel.slug, '')
    return context
{'fraction_non_alphanumeric': 0.12577319587628866, 'fraction_numerical': 0.005498281786941581, 'mean_word_length': 3.022099447513812, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2094235', 'n_tokens_mistral': 419, 'n_tokens_neox': 405, 'n_words': 82}