Skip to content
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

Formatting fails silently #20

Closed
sblask opened this issue Nov 15, 2021 · 1 comment · Fixed by #22
Closed

Formatting fails silently #20

sblask opened this issue Nov 15, 2021 · 1 comment · Fixed by #22
Milestone

Comments

@sblask
Copy link

sblask commented Nov 15, 2021

I just ran into this: psf/black#1948 but it took me a long time to figure this out because when running formatting through the lsp-server I did not get any error at all. It's just silent and I didn't know whether I did something wrong or not. There is nothing in the logs either. It would be good to have some kind of indication that something failed...

The error I get when running black on the command line is:

error: cannot format test.py: Cannot parse: 33:32:     with (fs.open(source, "rb") as source_input, fs.open( destination, "wb") as output):
Oh no! 💥 💔 💥
1 file failed to reformat.
@haplo
Copy link
Collaborator

haplo commented Nov 24, 2021

@sblask I was able to reproduce the problem and have a solution with #22. It works for me, I now see the error in lsp stderr.

@haplo haplo added this to the v1.0.1 milestone Nov 25, 2021
@haplo haplo closed this as completed in #22 Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants