Skip to content

Commit 40c4764

Browse files
committed
prefer string double quote, yet again.
1 parent 8c3143c commit 40c4764

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

uncompyle6/scanner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,8 @@ def prefer_double_quote(string: str) -> str:
654654
Prefer a double quoted string over a
655655
single quoted string when possible
656656
"""
657-
if string.find("'") == -1 and not string.startswith("'''"):
658-
return f'"{string[1:-2]}"'
657+
if string[1:-1].find('"') == -1:
658+
return f'"{string[1:-1]}"'
659659
return string
660660

661661

0 commit comments

Comments
 (0)