python edge case for python end of line mapping

prevent : from jumping to the end of the line if the matching end
character indicates we are in a list or dict.