[blockdiag] 09/29: Import Debian patch 1.1.6-1.1

Andreas Tille tille at debian.org
Tue Jan 10 21:35:57 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository blockdiag.

commit 0a6836f00a1a72798b3d2f609b22c1793588db66
Author: Evgeni Golov <evgeni at debian.org>
Date:   Wed Jul 18 21:16:06 2012 +0200

    Import Debian patch 1.1.6-1.1
---
 debian/changelog                   |   8 ++
 debian/patches/fix-pep8-violations | 230 +++++++++++++++++++++++++++++++++++++
 debian/patches/series              |   1 +
 3 files changed, 239 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index dc83937..1233654 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+blockdiag (1.1.6-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix PEP8 violations with a patch from upstream (31961dd5ba9b).
+    Closes: #681328
+
+ -- Evgeni Golov <evgeni at debian.org>  Wed, 18 Jul 2012 21:16:06 +0200
+
 blockdiag (1.1.6-1) unstable; urgency=low
 
   * New upstream release
diff --git a/debian/patches/fix-pep8-violations b/debian/patches/fix-pep8-violations
new file mode 100644
index 0000000..36c4006
--- /dev/null
+++ b/debian/patches/fix-pep8-violations
@@ -0,0 +1,230 @@
+From: tk0miya <i.tkomiya at gmail.com>
+Last-Update: 2012-06-06
+Subject: Fix pep8 violations
+
+# HG changeset patch
+# User tk0miya <i.tkomiya at gmail.com>
+# Date 1338954802 -32400
+# Node ID 31961dd5ba9b1e1bc46a90540cda0078430bd193
+# Parent  ad3f5281dab41cecebe2db1261bb24713150b5b3
+Fix pep8 violations
+
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/builder.py
+--- a/src/blockdiag/builder.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/builder.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -502,11 +502,11 @@
+ 
+     @property
+     def edges(self):
+-        for edge in (e for e in self.diagram.edges  if e.style != 'none'):
++        for edge in (e for e in self.diagram.edges if e.style != 'none'):
+             yield edge
+ 
+         for group in self.groups:
+-            for edge in (e for e in group.edges  if e.style != 'none'):
++            for edge in (e for e in group.edges if e.style != 'none'):
+                 yield edge
+ 
+     def run(self):
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/drawer.py
+--- a/src/blockdiag/drawer.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/drawer.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -75,7 +75,7 @@
+     @property
+     def edges(self):
+         edges = self.diagram.traverse_edges(preorder=True)
+-        for edge in (e for e in edges  if e.style != 'none'):
++        for edge in (e for e in edges if e.style != 'none'):
+             yield edge
+ 
+     def pagesize(self, scaled=False):
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/elements.py
+--- a/src/blockdiag/elements.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/elements.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -588,7 +588,7 @@
+ 
+     def set_plugin(self, name, attrs):
+         try:
+-            kwargs = dict([str(unquote(attr.name)), unquote(attr.value)] \
++            kwargs = dict([str(unquote(attr.name)), unquote(attr.value)]
+                           for attr in attrs)
+             plugins.load([name], diagram=self, **kwargs)
+         except:
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/imagedraw/filters/linejump.py
+--- a/src/blockdiag/imagedraw/filters/linejump.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/imagedraw/filters/linejump.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -128,7 +128,7 @@
+         for st, ed in zip(xy[:-1], xy[1:]):
+             self.get_lazy_method("line")((st, ed), **kwargs)
+ 
+-            if 'jump' in kwargs and kwargs['jump'] == True:
++            if 'jump' in kwargs and kwargs['jump'] is True:
+                 if st.y == ed.y:    # horizonal
+                     insort(self.ytree, (st.y, 0, (st, ed)))
+                 elif st.x == ed.x:  # vertical
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/imagedraw/simplesvg.py
+--- a/src/blockdiag/imagedraw/simplesvg.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/imagedraw/simplesvg.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -203,11 +203,11 @@
+         self.path.append('t%s %s' % (x, y))
+ 
+     def ellarc(self, rx, ry, xrot, laf, sf, x, y):
+-        self.path.append('A%s,%s %s %s %s %s %s' % \
++        self.path.append('A%s,%s %s %s %s %s %s' %
+                          (rx, ry, xrot, laf, sf, x, y))
+ 
+     def relellarc(self, rx, ry, xrot, laf, sf, x, y):
+-        self.path.append('a%s,%s %s %s %s %s %s' % \
++        self.path.append('a%s,%s %s %s %s %s %s' %
+                          (rx, ry, xrot, laf, sf, x, y))
+ 
+     def __repr__(self):
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/metrics.py
+--- a/src/blockdiag/metrics.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/metrics.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -42,7 +42,7 @@
+         else:
+             elem = XY(x, y)
+ 
+-        if self.stroking == False:
++        if self.stroking is False:
+             self.stroking = True
+             polyline = []
+             if self.xy:
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/noderenderer/__init__.py
+--- a/src/blockdiag/noderenderer/__init__.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/noderenderer/__init__.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -101,7 +101,7 @@
+         self.render_number_badge(drawer, **kwargs)
+ 
+     def render_icon(self, drawer, **kwargs):
+-        if self.node.icon != None and kwargs.get('shadow') != True:
++        if self.node.icon is not None and kwargs.get('shadow') is False:
+             drawer.loadImage(self.node.icon, self.iconbox)
+ 
+     def render_shape(self, drawer, format, **kwargs):
+@@ -116,7 +116,7 @@
+                             line_spacing=self.metrics.line_spacing)
+ 
+     def render_number_badge(self, drawer, **kwargs):
+-        if self.node.numbered != None and kwargs.get('shadow') != True:
++        if self.node.numbered is not None and kwargs.get('shadow') is False:
+             badgeFill = kwargs.get('badgeFill')
+ 
+             xy = self.metrics.cell(self.node).topleft
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/tests/test_builder_edge.py
+--- a/src/blockdiag/tests/test_builder_edge.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/tests/test_builder_edge.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -46,7 +46,7 @@
+         if edge.node1.id == 'D':
+             assert edge.dir == 'none'
+             assert edge.color == (0, 0, 0)
+-            assert edge.thick == None
++            assert edge.thick is None
+         elif edge.node1.id == 'F':
+             assert edge.dir == 'forward'
+             assert edge.color == (0, 0, 0)
+@@ -54,7 +54,7 @@
+         else:
+             assert edge.dir == 'forward'
+             assert edge.color == (255, 0, 0)  # red
+-            assert edge.thick == None
++            assert edge.thick is None
+ 
+     positions = {'A': (0, 0), 'B': (1, 0), 'C': (2, 0),
+                  'D': (0, 1), 'E': (1, 1), 'F': (0, 2), 'G': (1, 2)}
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/tests/test_utils_fontmap.py
+--- a/src/blockdiag/tests/test_utils_fontmap.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/tests/test_utils_fontmap.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -288,7 +288,7 @@
+         self.assertEqual(20, font4.size)
+ 
+     def test_fontmap_using_fontalias(self):
+-        _config = ("[fontmap]\nserif-bold: %s\n" + \
++        _config = ("[fontmap]\nserif-bold: %s\n" +
+                    "[fontalias]\ntest = serif-bold\n") % self.fontpath[0]
+         config = StringIO(_config)
+         fmap = FontMap(config)
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/tests/utils.py
+--- a/src/blockdiag/tests/utils.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/tests/utils.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -82,11 +82,11 @@
+                         found = True
+ 
+                 if not found:
+-                    raise RuntimeError('edge (%s -> %s) is not found' % \
++                    raise RuntimeError('edge (%s -> %s) is not found' %
+                                        (id1, id2))
+         else:
+             print "[node.%s]" % name
+-            for node in (n for n in diagram.nodes  if n.drawable):
++            for node in (n for n in diagram.nodes if n.drawable):
+                 print node
+                 value = getattr(node, name)
+                 eq_(values[node.id], value)
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/utils/TextFolder.py
+--- a/src/blockdiag/utils/TextFolder.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/utils/TextFolder.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -44,7 +44,7 @@
+     >>> zenkaku_len(u"あいc")
+     2
+     """
+-    return len([x for x in string  if is_zenkaku(x)])
++    return len([x for x in string if is_zenkaku(x)])
+ 
+ 
+ def hankaku_len(string):
+@@ -58,7 +58,7 @@
+     >>> hankaku_len(u"あいc")
+     1
+     """
+-    return len([x for x in string  if not is_zenkaku(x)])
++    return len([x for x in string if not is_zenkaku(x)])
+ 
+ 
+ def string_width(string):
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/utils/bootstrap.py
+--- a/src/blockdiag/utils/bootstrap.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/utils/bootstrap.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -108,7 +108,7 @@
+                      help='use FONTMAP file to draw diagram', metavar='FONT')
+         p.add_option('--no-transparency', dest='transparency',
+                      default=True, action='store_false',
+-                     help='do not make transparent background of diagram ' +\
++                     help='do not make transparent background of diagram ' +
+                           '(PNG only)')
+         p.add_option('-T', dest='type', default='PNG',
+                      help='Output diagram as TYPE format')
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/utils/ellipse.py
+--- a/src/blockdiag/utils/ellipse.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/utils/ellipse.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -24,7 +24,7 @@
+     phi = (start / 180.0) * math.pi
+     while phi <= (end / 180.0) * math.pi:
+         yield phi
+-        phi += du / math.sqrt((a * math.sin(phi)) ** 2 + \
++        phi += du / math.sqrt((a * math.sin(phi)) ** 2 +
+                               (b * math.cos(phi)) ** 2)
+ 
+ 
+diff -r ad3f5281dab41cecebe2db1261bb24713150b5b3 -r 31961dd5ba9b1e1bc46a90540cda0078430bd193 src/blockdiag/utils/rst/directives.py
+--- a/src/blockdiag/utils/rst/directives.py	Wed Jun 06 12:23:29 2012 +0900
++++ b/src/blockdiag/utils/rst/directives.py	Wed Jun 06 12:53:22 2012 +0900
+@@ -230,7 +230,7 @@
+         widths = [25] + [50] * (len(klass.desctable) - 1)
+         headers = [klass.attrname[n] for n in klass.desctable]
+ 
+-        descriptions = [n.to_desctable() for n in nodes  if n.drawable]
++        descriptions = [n.to_desctable() for n in nodes if n.drawable]
+         descriptions.sort(cmp_node_number)
+ 
+         for i in reversed(range(len(headers))):
+@@ -252,7 +252,7 @@
+ 
+         widths = [25, 50]
+         headers = ['Name', 'Description']
+-        descriptions = [e.to_desctable() for e in edges  if e.style != 'none']
++        descriptions = [e.to_desctable() for e in edges if e.style != 'none']
+ 
+         if any(desc[1] for desc in descriptions):
+             return self._description_table(descriptions, widths, headers)
diff --git a/debian/patches/series b/debian/patches/series
index 9e5a465..d7bfde7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 update_egg-info
+fix-pep8-violations

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/blockdiag.git



More information about the debian-science-commits mailing list