show the value causing problem in deprecation warning (#3558)

This commit is contained in:
Thomas Brandého 2024-06-26 22:25:23 +02:00 committed by GitHub
parent cca037421b
commit 6863e8ce8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -416,7 +416,7 @@ class Var:
if _var_is_string is None and type_ is str:
console.deprecate(
feature_name="Creating a Var from a string without specifying _var_is_string",
feature_name=f"Creating a Var ({value}) from a string without specifying _var_is_string",
reason=(
"Specify _var_is_string=False to create a Var that is not a string literal. "
"In the future, creating a Var from a string will be treated as a string literal "