graphite-project / carbon

Consider using f-strings PYL-C0209
Performance
Minor
8 months ago8 months old
Formatting a regular string which could be a f-string
 89  def removeDestination(self, destination):
 90    (server, port, instance) = destination
 91    if not self.hasDestination(destination):
 92      raise Exception("destination instance (%s, %s) not configured" % (server, instance)) 93    del self.instance_ports[(server, instance)]
 94    self.ring.remove_node((server, instance))
 95
Formatting a regular string which could be a f-string
 82  def addDestination(self, destination):
 83    (server, port, instance) = destination
 84    if self.hasDestination(destination):
 85      raise Exception("destination instance (%s, %s) already configured" % (server, instance)) 86    self.instance_ports[(server, instance)] = port
 87    self.ring.add_node((server, instance))
 88