From 4dff67cee5f1634373617c551e08289d28263eec Mon Sep 17 00:00:00 2001 From: Konstantin Gukov Date: Thu, 25 May 2023 17:31:30 +0200 Subject: [PATCH] convert to f-strings --- gpt4all-bindings/python/gpt4all/gpt4all.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpt4all-bindings/python/gpt4all/gpt4all.py b/gpt4all-bindings/python/gpt4all/gpt4all.py index 38f1dfba..6ea0f2a7 100644 --- a/gpt4all-bindings/python/gpt4all/gpt4all.py +++ b/gpt4all-bindings/python/gpt4all/gpt4all.py @@ -81,14 +81,14 @@ class GPT4All(): try: os.makedirs(DEFAULT_MODEL_DIRECTORY, exist_ok=True) except OSError as exc: - raise ValueError("Failed to create model download directory at {}: {}. " - "Please specify model_path.".format(DEFAULT_MODEL_DIRECTORY, exc)) + raise ValueError(f"Failed to create model download directory at {DEFAULT_MODEL_DIRECTORY}: {exc}. " + "Please specify model_path.") model_path = DEFAULT_MODEL_DIRECTORY else: model_path = model_path.replace("\\", "\\\\") if not os.path.exists(model_path): - raise ValueError("Invalid model directory: {}".format(model_path)) + raise ValueError(f"Invalid model directory: {model_path}") model_dest = os.path.join(model_path, model_filename).replace("\\", "\\\\") if os.path.exists(model_dest):