Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bug when replacing quote variations #4309

Closed
Susexe opened this issue Apr 13, 2024 · 1 comment
Closed

A bug when replacing quote variations #4309

Susexe opened this issue Apr 13, 2024 · 1 comment
Labels
T: bug Something isn't working

Comments

@Susexe
Copy link

Susexe commented Apr 13, 2024

Describe the bug

It fails on .replace('"', "'").

To Reproduce


output_folder = "Output"
row = {'name': '"Sample Movie"'}

file_path = os.path.join(output_folder, f"{row['name'].replace('"', "'")}.md")
print(file_path)

And run it with these arguments:

$ black file.py

The resulting error is:

INTERNAL ERROR: Black produced code that is not equivalent to the source.

Environment

  • Black's version: 24.4.0
  • OS and Python version: Windows/Python 3.12.3

Additional context

blk_7gcnr_o1.log

@Susexe Susexe added the T: bug Something isn't working label Apr 13, 2024
@hauntsaninja
Copy link
Collaborator

Duplicate of #3746 (this is only valid syntax on Python 3.12 and newer)

@hauntsaninja hauntsaninja closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants