#NEWLINE# def _prepare_auto_rowspan( self ) : #NEWLINE# #INDENT# auto_rowspan_columns = [ column for column in self . shown_bound_columns if column . auto_rowspan ] #NEWLINE# if auto_rowspan_columns : #NEWLINE# #INDENT# self . data = list ( self . data ) #NEWLINE# no_value_set = object ( ) #NEWLINE# for column in auto_rowspan_columns : #NEWLINE# #INDENT# rowspan_by_row = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# prev_value = no_value_set #NEWLINE# prev_row = no_value_set #NEWLINE# for bound_row in self . bound_rows ( ) : #NEWLINE# #INDENT# value = BoundCell ( bound_row , column ) . value #NEWLINE# if ( prev_value != value ) : #NEWLINE# #INDENT# rowspan_by_row [ id ( bound_row . row ) ] = 1 #NEWLINE# prev_value = value #NEWLINE# prev_row = bound_row . row #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# rowspan_by_row [ id ( prev_row ) ] += 1 #NEWLINE# #UNINDENT# #UNINDENT# column . cell . attrs [ 'rowspan' ] = set_row_span ( rowspan_by_row ) #NEWLINE# assert ( 'style' not in column . cell . attrs ) #NEWLINE# column . cell . attrs [ 'style' ] = set_display_none ( rowspan_by_row )