parameters: (self, contents, index)
return_statement: return None
docstring: Find the right bracket starting at the given index, or 0.
docstring_summary: Find the right bracket starting at the given index, or 0.
docstring_tokens: Find the right bracket starting at the given index or 0 .
function: def findright(self, contents, index):
      "Find the right bracket starting at the given index, or 0."
      depth = 1
      while index < len(contents):
        if self.checkleft(contents, index):
          depth += 1
        if self.checkright(contents, index):
          depth -= 1
        if depth == 0:
          return index
        index += 1
      return None
function_tokens: def findright ( self , contents , index ) : depth = 1 while index < len ( contents ) : if self . checkleft ( contents , index ) : depth += 1 if self . checkright ( contents , index ) : depth -= 1 if depth == 0 : return index index += 1 return None