File can not be formatted
from datetime import datetime
created = 1699960500
dt = datetime.fromtimestamp(created)
a = "hello"
n = "world"
print(f"{a}. {n} ({dt.strftime("%Y-%m-%d-%H:%M:%S")})")
And run it with these arguments:
The resulting error is:
error: cannot format file.py:
Cannot parse: 9:35: print(f"{a}. {n} ({dt.strftime("%Y-%m-%d-%H:%M:%S")})")
Expected behavior
Passes black or makes correction.
Perhaps this is resolved elsewhere. e.g. #1132
Environment
- Black's version: black==23.11.0
- OS and Python version: MacOS 14.0 (23A344) , Python 3.12.0
File can not be formatted
And run it with these arguments:
The resulting error is:
error: cannot format file.py:
Cannot parse: 9:35: print(f"{a}. {n} ({dt.strftime("%Y-%m-%d-%H:%M:%S")})")
Expected behavior
Passes black or makes correction.
Perhaps this is resolved elsewhere. e.g. #1132
Environment