From 2a90b767e8636b49d7cd930d746b7132c3bfa3c2 Mon Sep 17 00:00:00 2001 From: Aaron Munger Date: Fri, 19 Jan 2024 14:37:34 -0800 Subject: [PATCH] wrap string variables in quotes (#15042) --- .../getVariableInfo/vscodeGetVariableInfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonFiles/vscode_datascience_helpers/getVariableInfo/vscodeGetVariableInfo.py b/pythonFiles/vscode_datascience_helpers/getVariableInfo/vscodeGetVariableInfo.py index 7abbbbd1484..ec5431b36de 100644 --- a/pythonFiles/vscode_datascience_helpers/getVariableInfo/vscodeGetVariableInfo.py +++ b/pythonFiles/vscode_datascience_helpers/getVariableInfo/vscodeGetVariableInfo.py @@ -15,7 +15,7 @@ def truncateString(string): def getValue(variable, nested=False): if _VSCODE_builtins.type(variable) == _VSCODE_builtins.str: - return truncateString(variable) + return f"'{truncateString(variable)}'" elif ( _VSCODE_builtins.type(variable) == _VSCODE_builtins.int or _VSCODE_builtins.type(variable) == _VSCODE_builtins.float