diff --git a/uncompyle6/scanner.py b/uncompyle6/scanner.py index a84b5e5b..c5fbc6f3 100644 --- a/uncompyle6/scanner.py +++ b/uncompyle6/scanner.py @@ -662,7 +662,7 @@ def prefer_double_quote(string: str) -> str: single quoted string when possible """ if string.find("'") == -1: - return f'"{string}"' + return '"%s"' % string return repr(string)