Closed traits closed 4 months ago
I faced the same issue. For some reason Black didn't work in git folders. But when I create a new folder with a Python file and make some changes, Black could find the file and format it correctly. Then when I run git init Black stopped working for some reason. Deleting the .git hidden folder seems to resolve the issue after some time.
Solution: I reverted back to v2023.6.0 until the issue is fixed.
This is an issue with black
itself (see https://github.com/psf/black/issues/4205). The current option is to pin the extension to older version until a fix is released by black.
System Win10, Python version see below, black ==24.1.1 is installed (error happens with all versions - bundled or not):
But there is a file and it is known: main.py. So, what?
More verbose output (What is the meaning of the server error?):
Perhaps related:
"v" is a mapped device
v -> G:\programming
. But this has to be supported.This all works with the now deprecated addon from (https://marketplace.visualstudio.com/items?itemName=joslarson.black-vscode)
Edit: I fixed the incorrect setting of blacks "--verbose" flag by myself and the verbose output becomes more clear now (see large output block above). So, this seems to be some problem with black itself? Or is it the version info gathering run as seen in the last cited output that causes the complete break of the actual formatting task?