From debdce35e7fec70051eb3f3ba2f20b2f6886d873 Mon Sep 17 00:00:00 2001 From: Mariam Ahhttouche Date: Mon, 16 Feb 2026 16:16:29 +0100 Subject: [PATCH] uv_python module: refactor code --- plugins/modules/uv_python.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/modules/uv_python.py b/plugins/modules/uv_python.py index 3b3c0f021e..a88066c7d8 100644 --- a/plugins/modules/uv_python.py +++ b/plugins/modules/uv_python.py @@ -123,9 +123,7 @@ class UV: """ rc, out, _ = self._find_python("--show-version") latest_version = self._get_latest_patch_release() - if rc == 0: - detected_version = out.split()[0] - if detected_version == latest_version: + if rc == 0 and out.split()[0] == latest_version: return False, latest_version if self.module.check_mode: return True, latest_version