Browse Source

pyflakes hates my guts

pull/300/head
Piotr Maślanka 9 years ago
parent
commit
0022f73650
  1. 11
      pygal/graph/line.py

11
pygal/graph/line.py

@ -144,13 +144,15 @@ class Line(Graph):
view_values = self._fill(view_values)
if self.allow_interruptions:
# view_values are in form [(x1, y1), (x2, y2)]. We need to split that
# into multiple sequences if a None is present here
# view_values are in form [(x1, y1), (x2, y2)]. We
# need to split that into multiple sequences if a
# None is present here
sequences = []
cur_sequence = []
for x, y in view_values:
if y is None and len(cur_sequence) > 0: # emit current subsequence
if y is None and len(cur_sequence) > 0:
# emit current subsequence
sequences.append(cur_sequence)
cur_sequence = []
elif y is None: # just discard
@ -167,7 +169,8 @@ class Line(Graph):
for seq in sequences:
self.svg.line(
serie_node['plot'], seq, close=self._self_close,
class_='line reactive' + (' nofill' if not serie.fill else ''))
class_='line reactive' +
(' nofill' if not serie.fill else ''))
def _compute(self):
"""Compute y min and max and y scale and set labels"""

Loading…
Cancel
Save