#NEWLINE# def _MarkLinesToFormat( uwlines , lines ) : #NEWLINE# #INDENT# "Skip sections of code that we shouldn't reformat." #NEWLINE# if lines : #NEWLINE# #INDENT# for uwline in uwlines : #NEWLINE# #INDENT# uwline . disable = True #NEWLINE# #UNINDENT# for ( start , end ) in sorted ( lines ) : #NEWLINE# #INDENT# for uwline in uwlines : #NEWLINE# #INDENT# if ( uwline . lineno > end ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# if ( uwline . lineno >= start ) : #NEWLINE# #INDENT# uwline . disable = False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( end . last . lineno >= start ) : #NEWLINE# #INDENT# uwline . disable = False #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# index = 0 #NEWLINE# while ( index < len ( uwlines ) ) : #NEWLINE# #INDENT# uwline = uwlines [ index ] #NEWLINE# if uwline . is_comment : #NEWLINE# #INDENT# if _DisableYAPF ( uwline . first . value . strip ( ) ) : #NEWLINE# #INDENT# while ( index < len ( uwlines ) ) : #NEWLINE# #INDENT# uwline = uwlines [ index ] #NEWLINE# uwline . disable = True #NEWLINE# if ( uwline . is_comment and _EnableYAPF ( uwline . first . value . strip ( ) ) ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# index += 1 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if re . search ( DISABLE_PATTERN , uwline . last . value . strip ( ) , re . IGNORECASE ) : #NEWLINE# #INDENT# uwline . disable = True #NEWLINE# #UNINDENT# #UNINDENT# index += 1