def added(self) -> int:
        """
        Return the total number of added lines in the file.

        :return: int lines_added
        """
        added = 0
        for line in self.diff.replace('\r', '').split("\n"):
            if line.startswith('+') and not line.startswith('+++'):
                added += 1
        return added
def added ( self ) -> int : added = 0 for line in self . diff . replace ( '\r' , '' ) . split ( "\n" ) : if line . startswith ( '+' ) and not line . startswith ( '+++' ) : added += 1 return added
Return the total number of added lines in the file.

        :return: int lines_added