From 9e8cc5e4c24a7df03c33749a91075779eb16fca5 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Mon, 29 Apr 2024 00:17:14 +0300 Subject: [PATCH] data_models: fix `get_a_sample_data_model` for Python 3.10 and 3.11 --- rendercv/data_models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rendercv/data_models.py b/rendercv/data_models.py index f0867d4..8ce1be1 100644 --- a/rendercv/data_models.py +++ b/rendercv/data_models.py @@ -1189,9 +1189,10 @@ def get_a_sample_data_model( """ # check if the theme is valid: if theme not in available_themes: + available_themes_string = ", ".join(available_themes) raise ValueError( - f"The theme should be one of the following: {", ".join(available_themes)}!" - f" The provided theme is \"{theme}\"." + f"The theme should be one of the following: {available_themes_string}!" + f' The provided theme is "{theme}".' ) name = name.encode().decode("unicode-escape")