def scan(self):
    """Scan the file for colours and add/remove regions appropriately"""

    # Return a list of all the line regions in the current file
    if self.action == 'update':
      regions = [self.view.line(s) for s in self.view.sel()]
    else:
      regions = self.view.lines(Region(0, self.view.size()))

    for region in regions:
      line = Line(self.view, region, self.id)
      if line.has_color():
        line.add_region()
      else:
        try:
          self.view.erase_regions(region.a % "gutter_color_%s")
        except:
          pass
dataset/ETHPy150Open ggordan/GutterColor/file.py/File.scan/swapped operands of `%`