Skip to content

Commit

Permalink
String double quotes, yet again
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Feb 18, 2024
1 parent bfbe377 commit 38c5610
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions decompyle3/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ def prefer_double_quote(string: str) -> str:
Prefer a double quoted string over a
single quoted string when possible
"""
if string.find("'") == -1 and not string.startswith("'''"):
return f'"{string[1:-2]}"'
if string[1:-1].find('"') == -1:
return f'"{string[1:-1]}"'
return string


Expand Down

0 comments on commit 38c5610

Please sign in to comment.