diff --git a/automate/manifest.py b/automate/manifest.py index d5c21f9..411ee3c 100644 --- a/automate/manifest.py +++ b/automate/manifest.py @@ -8,7 +8,9 @@ from utils.log import get_logger MANIFEST_FILENAME = '_manifest.json' -SHRINK_MOD_REGEX = r"{\n\s+(.+: .*),\n\s+(.+: .*),\n\s+(.+: .*)\n\s+}" +SHRINK_MOD_REGEX3 = r"{\n\s+(.+: .*),\n\s+(.+: .*),\n\s+(.+: .*)\n\s+}" +SHRINK_MOD_REGEX4 = r"{\n\s+(.+: .*),\n\s+(.+: .*),\n\s+(.+: .*),\n\s+(.+: .*)\n\s+}" +SHRINK_MOD_REGEX5 = r"{\n\s+(.+: .*),\n\s+(.+: .*),\n\s+(.+: .*),\n\s+(.+: .*),\n\s+(.+: .*)\n\s+}" __all__ = [ 'update_manifest', @@ -39,7 +41,9 @@ def _write_manifest(filename: Path, data: Dict[str, Any]): filename.parent.mkdir(parents=True, exist_ok=True) with open(filename, 'wt', encoding='utf-8', newline='\n') as f: content = json.dumps(data, indent='\t') - content = re.sub(SHRINK_MOD_REGEX, r'{ \1, \2, \3 }', content) + content = re.sub(SHRINK_MOD_REGEX3, r'{ \1, \2, \3 }', content) + content = re.sub(SHRINK_MOD_REGEX4, r'{ \1, \2, \3, \4 }', content) + content = re.sub(SHRINK_MOD_REGEX5, r'{ \1, \2, \3, \4, \5 }', content) f.write(content)