You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
prefer string double quote, yet again.
This commit is contained in:
@@ -654,8 +654,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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user