data/data_collection.py
def _get_file_changes(
            self, pull_request_number: int
    ) -> Union[Tuple[List[Tuple[str, int, int, int]], int], None]:
        """Retrieves the file changes information given a pull request id.

        This functions retrieves the line changes for each file path and the
        total number of line changes of a certain pull request.

        Args:
            pull_request_number: An integer of pull request id.
        Returns:
            A tuple of a list and integer. The list is a list of tuple. Each
            tuple contains a str and three integers, indicating the file path,
            number of additions, number of deletions, number of line changes.
            The integer is the total number of line changes.
        """
        files = get_pull_request_files(
            self._repo_name, pull_request_number, self._auth)
        if not files:
            return None
        files_changes = []
        num_line_changes = 0
        for file in files:
            file_name = file['filename']
            num_additions = file['additions']
            num_deletions = file['deletions']
            num_changes = file['changes']
            num_line_changes += num_changes
            files_changes.append((file_name, num_additions, num_deletions,
                                  num_changes))
        return files_changes, num_line_changes
Retrieves the file changes information given a pull request id.

        This functions retrieves the line changes for each file path and the
        total number of line changes of a certain pull request.

        Args:
            pull_request_number: An integer of pull request id.
        Returns:
            A tuple of a list and integer. The list is a list of tuple. Each
            tuple contains a str and three integers, indicating the file path,
            number of additions, number of deletions, number of line changes.
            The integer is the total number of line changes.
        
Retrieves the file changes information given a pull request id.
This functions retrieves the line changes for each file path and the
total number of line changes of a certain pull request.
Retrieves the file changes information given a pull request id . This functions retrieves the line changes for each file path and the total number of line changes of a certain pull request .
def _get_file_changes(
            self, pull_request_number: int
    ) -> Union[Tuple[List[Tuple[str, int, int, int]], int], None]:
        files = get_pull_request_files(
            self._repo_name, pull_request_number, self._auth)
        if not files:
            return None
        files_changes = []
        num_line_changes = 0
        for file in files:
            file_name = file['filename']
            num_additions = file['additions']
            num_deletions = file['deletions']
            num_changes = file['changes']
            num_line_changes += num_changes
            files_changes.append((file_name, num_additions, num_deletions,
                                  num_changes))
        return files_changes, num_line_changes
def _get_file_changes ( self , pull_request_number : int ) -> Union [ Tuple [ List [ Tuple [ str , int , int , int ] ] , int ] , None ] : files = get_pull_request_files ( self . _repo_name , pull_request_number , self . _auth ) if not files : return None files_changes = [ ] num_line_changes = 0 for file in files : file_name = file [ 'filename' ] num_additions = file [ 'additions' ] num_deletions = file [ 'deletions' ] num_changes = file [ 'changes' ] num_line_changes += num_changes files_changes . append ( ( file_name , num_additions , num_deletions , num_changes ) ) return files_changes , num_line_changes
Retrieves the file changes information given a pull request id.
Retrieves the file changes information given a pull request id .
"""Retrieves the file changes information given a pull request id.

        This functions retrieves the line changes for each file path and the
        total number of line changes of a certain pull request.

        Args:
            pull_request_number: An integer of pull request id.
        Returns:
            A tuple of a list and integer. The list is a list of tuple. Each
            tuple contains a str and three integers, indicating the file path,
            number of additions, number of deletions, number of line changes.
            The integer is the total number of line changes.
        """
A tuple of a list and integer. The list is a list of tuple. Each
tuple contains a str and three integers, indicating the file path,
number of additions, number of deletions, number of line changes.
The integer is the total number of line changes.
A tuple of a list and integer . The list is a list of tuple . Each tuple contains a str and three integers indicating the file path number of additions number of deletions number of line changes . The integer is the total number of line changes .
self
pull_request_number
int
An integer of pull request id.
An integer of pull request id .