From 92f529e64b44a3eebdaf76652f3bf2a3188f6b82 Mon Sep 17 00:00:00 2001 From: "[6~" Date: Thu, 14 May 2020 08:11:53 -0500 Subject: [PATCH] Placate flake8 3.8 --- pymbolic/interop/maxima.py | 8 ++++---- pymbolic/mapper/graphviz.py | 2 +- pymbolic/primitives.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pymbolic/interop/maxima.py b/pymbolic/interop/maxima.py index 4be1dcf..cfe3397 100644 --- a/pymbolic/interop/maxima.py +++ b/pymbolic/interop/maxima.py @@ -381,9 +381,9 @@ class MaximaKernel: import sys self.child.logfile = sys.stdout - def _sendline(self, l): + def _sendline(self, line): self._check_debug() - self.child.sendline(l) + self.child.sendline(line) def exec_str(self, s, enforce_prompt_numbering=True): cmd = s+";" @@ -420,8 +420,8 @@ class MaximaKernel: def clean_eval_str_with_setup(self, setup_lines, s): self.reset() - for l in setup_lines: - self.exec_str(l) + for line in setup_lines: + self.exec_str(line) return self.eval_str(s) diff --git a/pymbolic/mapper/graphviz.py b/pymbolic/mapper/graphviz.py index 776dd67..f474626 100644 --- a/pymbolic/mapper/graphviz.py +++ b/pymbolic/mapper/graphviz.py @@ -46,7 +46,7 @@ class GraphvizMapper(WalkMapper): """Return the dot source code for a previously traversed expression.""" return "digraph expression {\n%s\n}" % ( - "\n".join(" "+l for l in self.lines)) + "\n".join(" "+line for line in self.lines)) def get_id(self, expr): "Generate a unique node ID for dot for *expr*" diff --git a/pymbolic/primitives.py b/pymbolic/primitives.py index 0ca0a6d..ef67fb9 100644 --- a/pymbolic/primitives.py +++ b/pymbolic/primitives.py @@ -1467,7 +1467,7 @@ class Slice(Expression): @property def start(self): - if len(self.children) > 1: + if len(self.children) > 0: return self.children[0] else: return None -- GitLab