From 610f661da877a358c8b3cbc106b528fb1d0b8095 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 9 Dec 2024 11:37:24 -0500 Subject: [PATCH] fix: fixup for break in EscapeForCString (#274) The review suggestion in #271 accidentally changed the type of `result` and broke this part. --- pylib/gyp/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylib/gyp/__init__.py b/pylib/gyp/__init__.py index 5b16e0b..8933d0c 100755 --- a/pylib/gyp/__init__.py +++ b/pylib/gyp/__init__.py @@ -29,7 +29,7 @@ def EscapeForCString(string: bytes | str) -> str: string = string.encode(encoding='utf8') backslash_or_double_quote = {ord('\\'), ord('"')} - result = [] + result = '' for char in string: if char in backslash_or_double_quote or not 32 <= char < 127: result += '\\%03o' % char