Fix tox failures

Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
aiordache 2020-08-11 17:22:06 +02:00 committed by Anca Iordache
parent 7009370bf2
commit c90ba119f5
2 changed files with 9 additions and 12 deletions

View File

@ -86,17 +86,17 @@ def recursive_interpolate(obj, interpolator, config_path):
class TemplateWithDefaults(Template):
pattern = r"""
%(delim)s(?:
(?P<escaped>%(delim)s) |
(?P<named>%(id)s) |
{(?P<braced>%(bid)s)} |
{delim}(?:
(?P<escaped>{delim}) |
(?P<named>{id}) |
{{(?P<braced>{bid})}} |
(?P<invalid>)
)
""" % {
'delim': re.escape('$'),
'id': r'[_a-z][_a-z0-9]*',
'bid': r'[_a-z][_a-z0-9]*(?:(?P<sep>:?[-?])[^}]*)?',
}
""".format(
delim=re.escape('$'),
id=r'[_a-z][_a-z0-9]*',
bid=r'[_a-z][_a-z0-9]*(?:(?P<sep>:?[-?])[^}]*)?',
)
@staticmethod
def process_braced_group(braced, sep, mapping):

View File

@ -1,7 +1,4 @@
#!/usr/bin/env python3
from __future__ import absolute_import
from __future__ import unicode_literals
import re
import click