You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +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
|
Prefer a double quoted string over a
|
||||||
single quoted string when possible
|
single quoted string when possible
|
||||||
"""
|
"""
|
||||||
if string.find("'") == -1 and not string.startswith("'''"):
|
if string[1:-1].find('"') == -1:
|
||||||
return f'"{string[1:-2]}"'
|
return f'"{string[1:-1]}"'
|
||||||
return string
|
return string
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user