-
Notifications
You must be signed in to change notification settings - Fork 55
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
VSCode integration no longer working #527
Comments
Thanks @kedhammar for creating this issue. I think I'll use this one to collect links to related discussions and issues and to form a picture of current issues with VSCode. On that note, it seems #523 is related. |
With What seems to be happening is that you read a file with \r\n line ending and output a file with \r\r\n line endings. Debug wrapper script: import subprocess
import sys
print(sys.argv, file=sys.stderr)
cp = subprocess.run(["bin/darker.exe"] + sys.argv[1:], stdout=subprocess.PIPE)
print(cp.stdout[:400], file=sys.stderr)
sys.stdout.buffer.write(cp.stdout)
sys.exit(cp.returncode) Sample file to format import sys
import collections settings.json {
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
},
"python.analysis.typeCheckingMode": "off",
"black-formatter.path": ["py", "-3.11", "./scripts/darkerer.py"],
"black-formatter.args": ["--stdout", "--isort"],
"black-formatter.serverTransport": "stdio"
} The black formatter console in vs code shows this:
Running darker on the file normally (
|
Thanks @shane-kearns, I created a separate issue #604 for this. I'll keep this issue to collect links to related discussions and issues and to form a picture of current issues with VSCode. |
VSCode issues:
--stdout
doubles newlines #604--stdout
option throws error if dash is given indicating stdin input – breaks VSCode compatibility #523Original description by @kedhammar:
The text was updated successfully, but these errors were encountered: