Browse Source

Fix tox failures

Signed-off-by: aiordache <[email protected]>
aiordache 5 năm trước cách đây
mục cha
commit
c90ba119f5
2 tập tin đã thay đổi với 9 bổ sung12 xóa
  1. 9 9
      compose/config/interpolation.py
  2. 0 3
      script/release/release.py

+ 9 - 9
compose/config/interpolation.py

@@ -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):

+ 0 - 3
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