#NEWLINE# def __init__( self , end , start = 'now' , short_break = 5 , long_break = 15 , pomodoro_length = 25 , group_length = 4 , interval = False ) : #NEWLINE# #INDENT# self . pomodoro_length_seconds = ( pomodoro_length * 60 ) #NEWLINE# if ( start == 'now' ) : #NEWLINE# #INDENT# self . start = datetime . datetime . now ( ) #NEWLINE# self . grace = 60 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . start = self . _create_datetime ( start ) #NEWLINE# self . grace = 0 #NEWLINE# #UNINDENT# if interval : #NEWLINE# #INDENT# self . end = ( self . start + self . _create_timedelta ( end ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . end = self . _create_datetime ( pomodoro_length ) #NEWLINE# if ( self . end . time ( ) < self . start . time ( ) ) : #NEWLINE# #INDENT# self . end += datetime . timedelta ( days = 1 ) #NEWLINE# #UNINDENT# #UNINDENT# self . group_length = group_length #NEWLINE# self . short_break = short_break #NEWLINE# self . long_break = long_break