From 50d4c30a58b98f16de3f3f07f61651b6318e4a6d Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Sat, 19 Oct 2024 16:22:46 +0200 Subject: [PATCH] Add quotes back in to fix tests --- src/scribe_data/cli/cli_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scribe_data/cli/cli_utils.py b/src/scribe_data/cli/cli_utils.py index 24e58683b..4e75f4ebf 100644 --- a/src/scribe_data/cli/cli_utils.py +++ b/src/scribe_data/cli/cli_utils.py @@ -27,6 +27,8 @@ from scribe_data.utils import DEFAULT_JSON_EXPORT_DIR +# MARK: CLI Variables + LANGUAGE_DATA_EXTRACTION_DIR = Path(__file__).parent.parent / "language_data_extraction" LANGUAGE_METADATA_FILE = ( @@ -217,12 +219,12 @@ def validate_single_item(item, valid_options, item_type): ): closest_match = difflib.get_close_matches(item, valid_options, n=1) closest_match_str = ( - f" The closest matching {item_type} is {closest_match[0]}." + f" The closest matching {item_type} is '{closest_match[0]}'." if closest_match else "" ) - return f"Invalid {item_type} {item}.{closest_match_str}" + return f"Invalid {item_type} '{item}'.{closest_match_str}" return None