From 344a7d1676adf437fd7877087d4f18ab4ebfc883 Mon Sep 17 00:00:00 2001 From: Eric Lapouyade Date: Mon, 19 Oct 2020 14:10:24 +0200 Subject: [PATCH] flake8 fixes --- docxtpl/__init__.py | 8 ++++---- tests/escape.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docxtpl/__init__.py b/docxtpl/__init__.py index 51c1646..b4a1b8d 100644 --- a/docxtpl/__init__.py +++ b/docxtpl/__init__.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -''' +""" Created : 2015-03-12 @author: Eric Lapouyade -''' +""" __version__ = '0.11.0' import functools @@ -249,14 +249,14 @@ class DocxTemplate(object): run_properties = re.search(r'.*', m[0]) run_properties = run_properties[0] if run_properties else '' - p_resolve_text = lambda x:resolve_text(run_properties, paragraph_properties, x) + p_resolve_text = lambda x: resolve_text(run_properties, paragraph_properties, x) return re.sub(r']*)?>.*?', p_resolve_text, m[0], flags=re.DOTALL) def resolve_paragraph(m): paragraph_properties = re.search(r'.*', m[0]) paragraph_properties = paragraph_properties[0] if paragraph_properties else '' - p_resolve_run = lambda x:resolve_run(paragraph_properties, x) + p_resolve_run = lambda x: resolve_run(paragraph_properties, x) return re.sub(r']*)?>.*?', p_resolve_run, m[0], flags=re.DOTALL) diff --git a/tests/escape.py b/tests/escape.py index 865d693..1559a11 100644 --- a/tests/escape.py +++ b/tests/escape.py @@ -13,7 +13,7 @@ context = { 'the listing\nwith\nsome\nlines\nand special chars : <>& ...' ), 'page_break': R('\f'), - 'new_listing':""" + 'new_listing': """ This is a new listing Now, does not require Listing() Object Here is a \t tab\a