question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature request] coc-pyright does not take into account black errors

See original GitHub issue

I struggled a bit with the problem described in #229 until I ran black --diff --quiet <thefile> outside of vim (but with the correct venv), and got an actual error message from black complaining about a typo in my pyproject.toml. The error wasn’t in coc-pyright, but it was still displaying “file formatted with black”, which was misleading enough that I committed and pushed non-formatted code 🙈

I would be nice if coc-pyright could check the exit code of black and show some sort of error message (either the one from black, or just a pointer to where to look for details) if something went wrong.

I’ll take the opportunity to say thanks for a really nice piece of software 🙌

What’s the output of :CocCommand pyright.version coc-pyright 1.1.166 with Pyright 1.1.167

What’s the output of :CocCommand workspace.showOutput Pyright not relevant here

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
fannheywardcommented, Sep 14, 2021

I feel like it shouldn’t say “Formatted with black”, since it didn’t actually do it.

This has been fixed already and will in next release.

0reactions
laurentScommented, Sep 14, 2021

Thanks for the super quick fix! Yes, the error message does turn up in showOutput. But somehow, I don’t really see much more than a flash of error in the message area in neovim. If I run :messages after saving my python file, I see this:

[coc.nvim] Formatting with black failed
[coc.nvim] Formatted with black
"src/cli/main.py" 183L, 5419C written

but the first 2 lines flash by so quickly that I can’t see them. Is there a way to keep the error message visible? I feel like it shouldn’t say “Formatted with black”, since it didn’t actually do it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Information Correctly: Copyright and Fair Use - GCF Global
Learn about copyright and fair use issues facing writers today in this free lesson. It's especially important in the age of digital technology....
Read more >
Copyrights - Advertising Policies Help - Google Support
If you see unauthorized content, submit a copyright-related complaint. Below are some examples of what to avoid in your ads. Learn about what...
Read more >
Overview of the Registration Process - U.S. Copyright Office
Errors or Omissions in a Certificate of Registration . ... Generally, the Office will not issue separate registrations for the constituent.
Read more >
Feature Requests - Gather Help
How to view and submit feature requests, as well as commonly requested features that are not yet developed.
Read more >
Debunking Copyright Myths - American Bar Association
Instead of registering the copyrights in a work with the U.S. Copyright Office, the myth is that the protection of a “poor man's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found