From c90ba119f59e2c87b09f1938abba42d68b8501dc Mon Sep 17 00:00:00 2001 From: aiordache Date: Tue, 11 Aug 2020 17:22:06 +0200 Subject: [PATCH] Fix tox failures Signed-off-by: aiordache --- compose/config/interpolation.py | 18 +++++++++--------- script/release/release.py | 3 --- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/compose/config/interpolation.py b/compose/config/interpolation.py index 71e78bbaa..72cb484b1 100644 --- a/compose/config/interpolation.py +++ b/compose/config/interpolation.py @@ -86,17 +86,17 @@ def recursive_interpolate(obj, interpolator, config_path): class TemplateWithDefaults(Template): pattern = r""" - %(delim)s(?: - (?P%(delim)s) | - (?P%(id)s) | - {(?P%(bid)s)} | + {delim}(?: + (?P{delim}) | + (?P{id}) | + {{(?P{bid})}} | (?P) ) - """ % { - 'delim': re.escape('$'), - 'id': r'[_a-z][_a-z0-9]*', - 'bid': r'[_a-z][_a-z0-9]*(?:(?P:?[-?])[^}]*)?', - } + """.format( + delim=re.escape('$'), + id=r'[_a-z][_a-z0-9]*', + bid=r'[_a-z][_a-z0-9]*(?:(?P:?[-?])[^}]*)?', + ) @staticmethod def process_braced_group(braced, sep, mapping): diff --git a/script/release/release.py b/script/release/release.py index f53d1f3c1..c8e5e7f76 100644 --- a/script/release/release.py +++ b/script/release/release.py @@ -1,7 +1,4 @@ #!/usr/bin/env python3 -from __future__ import absolute_import -from __future__ import unicode_literals - import re import click