#NEWLINE# def _analyze( self , name , commits ) : #NEWLINE# #INDENT# author_commits = self . _commits_by_author ( commits ) #NEWLINE# my_commits = self . _coalesce_author ( name , author_commits ) #NEWLINE# sorted_commits = self . _sort_by_date ( my_commits ) #NEWLINE# ( my_ranking , last_place ) = self . _ranking ( name , author_commits ) #NEWLINE# first_commit = ( sorted_commits [ 0 ] if my_commits else None ) #NEWLINE# last_commit = ( sorted_commits [ ( - 1 ) ] if my_commits else None ) #NEWLINE# self . analysis . all = self . _create_stats ( ( ( first_commit . date , last_commit . date ) if ( last_commit is not None ) else None ) , ( len ( my_commits ) , len ( commits ) ) , ( my_ranking , last_place ) ) #NEWLINE# now = datetime . datetime . now ( ) #NEWLINE# year_ago = datetime . datetime ( ( now . year - 1 ) , now . month , now . day , now . hour , now . minute , now . second , now . microsecond ) #NEWLINE# if ( last_commit . date < year_ago ) : #NEWLINE# #INDENT# self . analysis . past_year = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# past_year = list ( filter ( ( lambda commit : ( commit . date > year_ago ) ) , commits ) ) #NEWLINE# past_year_author_commits = self . _commits_by_author ( past_year ) #NEWLINE# past_year_my_commits = past_year_author_commits [ name ] #NEWLINE# ( my_ranking , last_place ) = self . _ranking ( name , past_year_author_commits ) #NEWLINE# self . analysis . past_year = self . _create_stats ( None , ( len ( past_year_my_commits ) , len ( past_year ) ) , ( my_ranking , last_place ) )