From 383433d8608e13a5a3434118c12109dc3a2e6446 Mon Sep 17 00:00:00 2001 From: Fechet Pierre-Antoine <22179913+pafechet@users.noreply.github.com> Date: Sat, 29 Nov 2025 18:54:23 +0100 Subject: [PATCH 1/2] fix validate path function --- verticapy/connection/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/verticapy/connection/utils.py b/verticapy/connection/utils.py index aaad77ec5..1e26d8e4a 100755 --- a/verticapy/connection/utils.py +++ b/verticapy/connection/utils.py @@ -114,7 +114,7 @@ def get_connection_file() -> str: return path -def validate_path(path: str): +def validate_path(path: str) -> str: """ Validates a file path to ensure it is secure and does not point to unintended or unsafe locations. This function @@ -196,3 +196,4 @@ def validate_path(path: str): raise ValueError( f"Cannot use path '{path}': directory is not owned by the current user." ) + return path \ No newline at end of file From e62e10a8d9861ca6cad692c72d1aab6dbd870c51 Mon Sep 17 00:00:00 2001 From: Fechet Pierre-Antoine <22179913+pafechet@users.noreply.github.com> Date: Sat, 29 Nov 2025 19:02:03 +0100 Subject: [PATCH 2/2] add returns value to docstring --- verticapy/connection/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/verticapy/connection/utils.py b/verticapy/connection/utils.py index 1e26d8e4a..476dfd05f 100755 --- a/verticapy/connection/utils.py +++ b/verticapy/connection/utils.py @@ -128,6 +128,11 @@ def validate_path(path: str) -> str: path : str The file path to validate. + Returns + ------- + string + The validated file path. + Raises ------ ValueError