From 5bab9a41d388433b7a02144f9bcfbdcca733d850 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 11 Oct 2025 22:18:37 +0200 Subject: [PATCH] Make consider-using-f-string changes compatible with older Python versions. --- plugins/module_utils/_compose_v2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/module_utils/_compose_v2.py b/plugins/module_utils/_compose_v2.py index 7fa645a5..3f4d2da8 100644 --- a/plugins/module_utils/_compose_v2.py +++ b/plugins/module_utils/_compose_v2.py @@ -176,7 +176,7 @@ _RE_PULL_EVENT = re.compile( r"\s*" r"(?P\S+)" r"\s+" - rf"(?P{'|'.join(re.escape(status) for status in DOCKER_STATUS_PULL)})" + f"(?P{'|'.join(re.escape(status) for status in DOCKER_STATUS_PULL)})" r"\s*" r"$" ) @@ -186,7 +186,7 @@ _RE_PULL_PROGRESS = re.compile( r"\s*" r"(?P\S+)" r"\s+" - rf"(?P{'|'.join( + f"(?P{'|'.join( re.escape(status) for status in sorted(DOCKER_PULL_PROGRESS_DONE | DOCKER_PULL_PROGRESS_WORKING) )})" @@ -200,7 +200,7 @@ _RE_ERROR_EVENT = re.compile( r"\s*" r"(?P\S+)" r"\s+" - rf"(?P{'|'.join(re.escape(status) for status in DOCKER_STATUS_ERROR)})" + f"(?P{'|'.join(re.escape(status) for status in DOCKER_STATUS_ERROR)})" r"\s*" r"(?P\S.*\S)?" r"$" @@ -211,7 +211,7 @@ _RE_WARNING_EVENT = re.compile( r"\s*" r"(?P\S+)" r"\s+" - rf"(?P{'|'.join(re.escape(status) for status in DOCKER_STATUS_WARNING)})" + f"(?P{'|'.join(re.escape(status) for status in DOCKER_STATUS_WARNING)})" r"\s*" r"(?P\S.*\S)?" r"$"