<commit_before>from rest_framework.reverse import reverse_lazy

from rockit.core import holders
from rockit.core import models

class MixesResolver(object):
 
    def resolve(self, request, holder):
        """
        Resolve names for (when, then, finish)
        """
        assert holder

        self._resolve_url(request, holder.when)
        self._resolve_url(request, holder.then)
        self._resolve_url(request, holder.finish)

        return holder

    def _resolve_url(self, request, container):
        assert container

        association = container['association']

        for item in container['items']:
            for item in when['items']:
                item['url'] = reverse_lazy('mixes-details', kwargs={ 'pk': item['identifier'], 'entry': association['entry'] }, request=request)


class MixesNameResolver(object):

    def resolve(self, holder):<commit_msg>Updated resolvers<commit_after>from rest_framework.reverse import reverse_lazy

from rockit.core import holders
from rockit.core import models

class MixesResolver(object):
 
    def resolve(self, request, holder):
        """
        Resolve names for (when, then, finish)
        """
        assert holder

        self._resolve_url(request, holder.when)
        self._resolve_url(request, holder.then)
        self._resolve_url(request, holder.finish)

        return holder

    def _resolve_url(self, request, container):
        assert container

        association = container['association']

        for item in container['items']:
            item['url'] = reverse_lazy('mixes-details', kwargs={ 'pk': item['identifier'], 'entry': association['entry'] }, request=request)


class MixesNameResolver(object):

    def resolve(self, holder):
{'fraction_non_alphanumeric': 0.10893371757925072, 'fraction_numerical': 0.0, 'mean_word_length': 3.173076923076923, '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': '793422', 'n_tokens_mistral': 473, 'n_tokens_neox': 454, 'n_words': 122}