Commits

Takeshi Komiya  committed fc107b8

Fix pylint violation: Unused variables

  • Participants
  • Parent commits 648b53c

Comments (0)

Files changed (5)

File src/blockdiag/imagedraw/png.py

         drawer.set_canvas_size(size)
         getattr(drawer, fn.__name__)(*args, **kwargs)
 
-        for i in range(15):
+        for _ in range(15):
             drawer._image = drawer._image.filter(ImageFilter.SMOOTH_MORE)
 
         return drawer._image

File src/blockdiag/metrics.py

             self.span_height[y] = height
 
     def node(self, node, use_padding=True):
-        x, y = node.xy
         x1, y1 = self._node_topleft(node, use_padding)
         x2, y2 = self._node_bottomright(node, use_padding)
 

File src/blockdiag/utils/bootstrap.py

     fontpath = None
     if options.font:
         for path in options.font:
-            _path, index = parse_fontpath(path)
+            _path, _ = parse_fontpath(path)
             if os.path.isfile(_path):
                 fontpath = path
                 break
     if fontpath is None:
         globber = (glob.glob(d) for d in fontdirs)
         for fontdir in sum(globber, []):
-            for root, dirs, files in os.walk(fontdir):
+            for root, _, files in os.walk(fontdir):
                 for font in fontfiles:
                     if font in files:
                         fontpath = os.path.join(root, font)

File src/blockdiag/utils/fontmap.py

         self.append_font(self.default_fontfamily, path)
 
     def append_font(self, fontfamily, path):
-        _path, index = parse_fontpath(path)
+        _path, _ = parse_fontpath(path)
         if path is None or os.path.isfile(_path):
             font = FontInfo(fontfamily, path, self.fontsize)
             self.fonts[font.familyname] = font

File src/blockdiag/utils/myitertools.py

 def istep(seq, step=2):
     iterable = iter(seq)
     while True:
-        yield [iterable.next() for i in range(step)]
+        yield [iterable.next() for _ in range(step)]
 
 
 def stepslice(iterable, steps):
             yield o
         else:
             yield iterable.next()
-            for i in xrange(n - 2):
+            for _ in xrange(n - 2):
                 iterable.next()
             yield iterable.next()
 
         # skip (2)
-        for i in xrange(step.next()):
+        for _ in xrange(step.next()):
             iterable.next()