<commit_before>from intelligine.cst import COL_SMELL
from intelligine.mechanism.TraversableDistanceFromMechanism import TraversableDistanceFromMechanism
from intelligine.synergy.event.Event import Event
from intelligine.cst import SMELL_FOOD, SMELL_EGG
from intelligine.synergy.object.StockedFood import StockedFood
from intelligine.synergy.object.ant.Egg import Egg
from synergine.core.exceptions import NotConcernedEvent


class SmellEvent(Event):

    _mechanism = TraversableDistanceFromMechanism
    _concern = COL_SMELL
    _each_cycle = 100
    _first_cycle_force = True
    _smell = {
        StockedFood: SMELL_FOOD,
        Egg: SMELL_EGG
    }
    """ Match between synergy class and smell type """

    def _prepare(self, object_id, context, parameters={}):
        if not parameters['points_distances']:
            raise NotConcernedEvent()

        return parameters<commit_msg>remove unused code<commit_after>from intelligine.cst import COL_SMELL
from intelligine.mechanism.TraversableDistanceFromMechanism import TraversableDistanceFromMechanism
from intelligine.synergy.event.Event import Event
from intelligine.cst import SMELL_FOOD, SMELL_EGG
from intelligine.synergy.object.StockedFood import StockedFood
from intelligine.synergy.object.ant.Egg import Egg
from synergine.core.exceptions import NotConcernedEvent


class SmellEvent(Event):

    _mechanism = TraversableDistanceFromMechanism
    _concern = COL_SMELL
    _each_cycle = 100
    _first_cycle_force = True

    def _prepare(self, object_id, context, parameters={}):
        if not parameters['points_distances']:
            raise NotConcernedEvent()

        return parameters
{'fraction_non_alphanumeric': 0.05907172995780591, 'fraction_numerical': 0.003616636528028933, 'mean_word_length': 4.64625850340136, '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': '2485114', 'n_tokens_mistral': 531, 'n_tokens_neox': 492, 'n_words': 115}