From 8d512d2eddf378a8dc4c53cf469c5255f841b678 Mon Sep 17 00:00:00 2001 From: wafi543 Date: Mon, 19 Apr 2021 12:49:04 +0300 Subject: [PATCH] Flake8 Rules --- docxtpl/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docxtpl/__init__.py b/docxtpl/__init__.py index 231a0e3..a199ec1 100644 --- a/docxtpl/__init__.py +++ b/docxtpl/__init__.py @@ -356,7 +356,7 @@ class DocxTemplate(object): if anchor is not None: docPr = anchor.find(nsp+'docPr') id = docPr.attrib['id'] - if not id in ids: + if id not in ids: ids.append(id) else: docPr.set('id', str(int(id)+amount)) @@ -368,14 +368,14 @@ class DocxTemplate(object): if anchor is not None: docPr = anchor.find(nsp+'docPr') id = docPr.attrib['id'] - if not id in ids: + if id not in ids: ids.append(id) else: docPr.set('id', str(int(id)+amount)) elif inline is not None: docPr = inline.find(nsp+'docPr') id = docPr.attrib['id'] - if not id in ids: + if id not in ids: ids.append(id) else: docPr.set('id', str(int(id)+amount))