'Constructor.
Creates a new unwrapped line with the given depth an initial list of tokens.
Constructs the doubly-linked lists for format tokens using their built-in
next_token and previous_token attributes.
Arguments:
depth: indentation depth of this line
tokens: initial list of tokens'

def __init__(self, depth, tokens=None):

    self.depth = depth
    self._tokens = (tokens or [])
    self.disable = False
    if self._tokens:
        for (index, tok) in enumerate(self._tokens[1:]):
            tok.previous_token = self._tokens[index]
            self._tokens[index].next_token = tok
