From 0022f73650cef7b02b706c25de6185210eccaef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= Date: Tue, 26 Jan 2016 22:08:53 +0100 Subject: [PATCH] pyflakes hates my guts --- pygal/graph/line.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pygal/graph/line.py b/pygal/graph/line.py index 6754b1f..fa48714 100644 --- a/pygal/graph/line.py +++ b/pygal/graph/line.py @@ -144,21 +144,23 @@ 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 + elif y is None: # just discard continue else: - cur_sequence.append((x,y)) # append the element + cur_sequence.append((x,y)) # append the element - if len(cur_sequence) > 0: # emit last possible sequence + if len(cur_sequence) > 0: # emit last possible sequence sequences.append(cur_sequence) else: # plain vanilla rendering @@ -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"""