You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running darker on the file normally (bin/darker --isort new-file.py) does not create bad line endings.
The problem can be reproduced without VSCode thusly, stdout gets double line endings:
With
"black-formatter.args": ["--stdout", "--isort"]
or"black-formatter.args": ["-d"]
, it almost works.However the file in vscode gains double line breaks when using SHIFT+ALT+F to format the file, and with format on save.
This is caused by https://github.com/akaihola/darkgraylib/blob/875dbaf613556f27a4e7949b45fcd798d4ab91f1/src/darkgraylib/utils.py#L17-L22 and commenting out that function to always return
"\n"
makes it work.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:
Sample file to format
settings.json
The black formatter console in vs code shows this:
Running darker on the file normally (
bin/darker --isort new-file.py
) does not create bad line endings.The problem can be reproduced without VSCode thusly, stdout gets double line endings:
Originally posted by @shane-kearns in #527 (comment)
The text was updated successfully, but these errors were encountered: