<commit_before>#!/usr/bin/env python

from PyQt4.QtCore import *
from PyQt4.QtGui import *

from structdata import g_project
from structdata import Param

from varslistwidget import VarsListWidget

class VarSetListWidget(VarsListWidget):

    """
    classe che deriva da VarsListWidget ed e' specifica per lavorare con
    action di tipo VAR_SET
    """

    def secondColumnItem(self, id_item):
        index = self.searchParamIndex(id_item)
        return self.item.params[index + 1].value

    def searchParamIndex(self, param_value):
        i = 0
        for param in self.item.params:
            if param.value == param_value:
                return i
            i += 1
<commit_msg>change secondColumnItem function, now check if searchParamIndex has found something<commit_after>#!/usr/bin/env python

from PyQt4.QtCore import *
from PyQt4.QtGui import *

from structdata import g_project
from structdata import Param

from varslistwidget import VarsListWidget

class VarSetListWidget(VarsListWidget):

    """
    classe che deriva da VarsListWidget ed e' specifica per lavorare con
    action di tipo VAR_SET
    """

    def secondColumnItem(self, id_item):
        index = self.searchParamIndex(id_item)
        if index:
            return self.item.params[index + 1].value
        return ""

    def searchParamIndex(self, param_value):
        i = 0
        for param in self.item.params:
            if param.value == param_value:
                return i
            i += 1
        return None

{'fraction_non_alphanumeric': 0.06878306878306878, 'fraction_numerical': 0.006613756613756613, 'mean_word_length': 2.654589371980676, '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': '501003', 'n_tokens_mistral': 444, 'n_tokens_neox': 437, 'n_words': 136}