data/feature_extraction.py
def compute_total_file_changes(lst: str, index: int) -> int:
        """Computes the count of file changes in the list.

        Args:
            lst: A str of list representation.
            index: A integer indicating whether to count additions, deletions
                or changes. 0 for additions, 1 for deletions, and 2 for changes.

        Returns: A integer indicating the count of file changes in the list.
        """
        if pd.isna(lst):
            return 0
        files_changes_lst = eval(lst)
        if len(files_changes_lst) == 0:
            return 0
        total = 0
        for t in files_changes_lst:
            changes = eval(t)[index]
            total += changes
        return total
Computes the count of file changes in the list.

        Args:
            lst: A str of list representation.
            index: A integer indicating whether to count additions, deletions
                or changes. 0 for additions, 1 for deletions, and 2 for changes.

        Returns: A integer indicating the count of file changes in the list.
        
Computes the count of file changes in the list.
Computes the count of file changes in the list .
def compute_total_file_changes(lst: str, index: int) -> int:
        if pd.isna(lst):
            return 0
        files_changes_lst = eval(lst)
        if len(files_changes_lst) == 0:
            return 0
        total = 0
        for t in files_changes_lst:
            changes = eval(t)[index]
            total += changes
        return total
def compute_total_file_changes ( lst : str , index : int ) -> int : if pd . isna ( lst ) : return 0 files_changes_lst = eval ( lst ) if len ( files_changes_lst ) == 0 : return 0 total = 0 for t in files_changes_lst : changes = eval ( t ) [ index ] total += changes return total
Computes the count of file changes in the list.
Computes the count of file changes in the list .
"""Computes the count of file changes in the list.

        Args:
            lst: A str of list representation.
            index: A integer indicating whether to count additions, deletions
                or changes. 0 for additions, 1 for deletions, and 2 for changes.

        Returns: A integer indicating the count of file changes in the list.
        """
lst
str
A str of list representation.
A str of list representation .
index
int
A integer indicating whether to count additions, deletions
or changes. 0 for additions, 1 for deletions, and 2 for changes.
A integer indicating whether to count additions deletions or changes . 0 for additions 1 for deletions and 2 for changes .