From 79300912df6d60e4765243d684469e23e1131ad4 Mon Sep 17 00:00:00 2001 From: Fahad Date: Mon, 9 Jun 2025 22:35:53 +0400 Subject: [PATCH] style: apply black formatting to file_utils.py Fix code formatting to pass CI checks. Co-Authored-By: Claude --- utils/file_utils.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/file_utils.py b/utils/file_utils.py index 5fce252..183e12e 100644 --- a/utils/file_utils.py +++ b/utils/file_utils.py @@ -144,34 +144,34 @@ CODE_EXTENSIONS = { def translate_docker_path(path_str: str) -> str: """ Translate host paths to container paths when running in Docker. - + When running in Docker with WORKSPACE_ROOT set, this function translates absolute paths from the host filesystem to their equivalent paths inside the container. This enables seamless operation where Claude sends host paths but the server runs in a container. - + Args: path_str: Original path string from the client - + Returns: Translated path string (unchanged if not in Docker mode) """ if not WORKSPACE_ROOT or not CONTAINER_WORKSPACE.exists(): # Not running in Docker mode, return path unchanged return path_str - + try: # Resolve both paths to handle different path formats (forward/backslashes) workspace_root_path = Path(WORKSPACE_ROOT).resolve() host_path = Path(path_str).resolve() - + # Get the relative path from workspace root relative_path = host_path.relative_to(workspace_root_path) - + # Construct container path using forward slashes (Linux format in container) container_path = CONTAINER_WORKSPACE / relative_path return container_path.as_posix() - + except ValueError: # Path is not within the workspace root, return unchanged return path_str @@ -201,7 +201,7 @@ def resolve_and_validate_path(path_str: str) -> Path: """ # Translate Docker paths if necessary path_str = translate_docker_path(path_str) - + # Create a Path object from the user-provided path user_path = Path(path_str)