-
Notifications
You must be signed in to change notification settings - Fork 37
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
cannot format xxxxx.py: Cannot parse: 219:50: xxxxx = f"TEST{now.strftime("%Y%m%d%H%M%S")}{random.randint(1,9999):0>4}" #517
Comments
@godtang This is coming from Black itself. Does it work when you try to format it from command line? |
sorry , i don't know how to format from command line |
What is the version of black where it worked? |
Hey @godtang ! I think I've discovered how to resolve your issue: could you try to replace the double-quotes with single-quotes inside your f-string curly braces (i.e. inside your call to In my use-case:
After changing inner double-quotes to single-quotes:
Both the VSCode
|
Closing this, since the build in |
Diagnostic Data
Behaviour
Expected Behavior
reformatted succ
Actual Behavior
Cannot parse
Reproduction Steps:
Logs:
Click here for detailed logs
2024-06-11 15:38:40.561 [info] error: cannot format xxxxx.py: Cannot parse: 219:52: xxxx = f"TEST{now.strftime("%Y%m%d%H%M%S")}{random.randint(1,9999):0>4}"Oh no! 💥 💔 💥
1 file failed to reformat.
Outcome When Attempting Debugging Steps:
Did running it from the command line work?
Extra Details
The text was updated successfully, but these errors were encountered: