Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion verticapy/connection/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -128,6 +128,11 @@ def validate_path(path: str):
path : str
The file path to validate.

Returns
-------
string
The validated file path.

Raises
------
ValueError
Expand Down Expand Up @@ -196,3 +201,4 @@ def validate_path(path: str):
raise ValueError(
f"Cannot use path '{path}': directory is not owned by the current user."
)
return path