From 62293b15c28c65da02db027013c0eb73cf49fb34 Mon Sep 17 00:00:00 2001 From: GladistonXD <50533550+GladistonXD@users.noreply.github.com> Date: Wed, 28 Jan 2026 10:10:24 -0300 Subject: [PATCH] Add optional parameter to prompt_path function Modify prompt_path function to add optional parameter for path existence check. --- votify/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/votify/utils.py b/votify/utils.py index 20474e8..81b306e 100644 --- a/votify/utils.py +++ b/votify/utils.py @@ -22,9 +22,9 @@ def _raise_response_exception(response: requests.Response): ) -def prompt_path(is_file: bool, initial_path: Path, description: str) -> Path: +def prompt_path(is_file: bool, initial_path: Path, description: str, optional: bool = False) -> Path: path_validator = click.Path( - exists=True, + exists=not optional, file_okay=is_file, dir_okay=not is_file, path_type=Path,