Skip to content
Prev Previous commit
Next Next commit
simplify things
  • Loading branch information
sunmy2019 committed Sep 3, 2023
commit 43d177c32b3d8889f312e42ed0eba2c390ac41bf
5 changes: 1 addition & 4 deletions Lib/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -1254,10 +1254,7 @@ def visit_JoinedStr(self, node):
escape_special_whitespace=True,
)
elif "\n" in value:
if "'" in quote_types:
quote_types.remove("'")
if '"' in quote_types:
quote_types.remove('"')
quote_types = [q for q in quote_types if q in _MULTI_QUOTES]
new_fstring_parts.append(value)

value = "".join(new_fstring_parts)
Expand Down