From 2b8885855cd436a1612ae3ca859511cf0fc9bc23 Mon Sep 17 00:00:00 2001 From: David Lysenko Date: Mon, 28 Jul 2025 13:12:02 +0200 Subject: [PATCH] [pycharm] PY-82799 Fix helper script to hide the metadata error GitOrigin-RevId: 4678e6c19a6158508430e9a4375d65dd5868424b --- python/helpers/uv/uv_sync_proxy.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/helpers/uv/uv_sync_proxy.py b/python/helpers/uv/uv_sync_proxy.py index 1e5daa479f29..89f95dd90050 100644 --- a/python/helpers/uv/uv_sync_proxy.py +++ b/python/helpers/uv/uv_sync_proxy.py @@ -21,7 +21,7 @@ venv_path = None try: sync_output = subprocess.check_output( [uv_path, "sync", "--script", script_path], - stderr=subprocess.STDOUT + stderr=subprocess.DEVNULL ).decode("utf-8") result = re.search(r"environment at: (.*)\n", sync_output) @@ -37,7 +37,6 @@ except subprocess.CalledProcessError as e: str_output = e.output.decode("utf-8") if "does not contain a PEP 723 metadata tag" in str_output: should_sync_project = True - print(str_output, file=sys.stderr) sync_segment = "" if should_sync_project else "--no-sync" @@ -49,6 +48,5 @@ if venv_path is not None: command = [uv_path, "run", active_segment, sync_segment] + sys.argv[4:] command = [segment for segment in command if segment != ""] -print() print(" ".join([f"\"{segment}\"" if " " in segment else segment for segment in command])) subprocess.call(command) \ No newline at end of file