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.

Disable specific warnings

See original GitHub issue

Hello,

thanks for maintaining this, I’m new to CoC and CoC-PyRight and it is quite pleasant to use.

Would it be possible to add a way to disable a specific warning (by its message for instance)? I’m using double underscore __ to mark a variable as unused (I’m not using single underscore as it is conflicting with the use of it for gettext), this is a common practice, and Coc-Pyright is showing a “not accessed” hint for that.

I know that there have been previous discussion (#107) pointing to diagnostic.showUnused but I want to keep unused variables hints, only disable it for this specific variable name.

Furthermore, Pyright is incorrectly marking some Twisted methods such as reactor.listenTCP or reactor.listenSSL as not existing, it would be useful to indicate that this must be ignored.

Thanks

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
fannheywardcommented, Sep 27, 2021

Try coc-pyright v1.1.171, coc-pyright will ignore "__" is not accessed diagnostics.

https://github.com/microsoft/pyright/issues/1931

0reactions
goffi-contribcommented, Sep 28, 2021

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Suppress compiler warnings - Visual Studio - Microsoft Learn
In the Disable Specific Warnings box, specify the error codes of the warnings that you want to suppress, separated by a semicolon.
Read more >
c# - How to disable specific warnings for the entire solution?
To do it for each project, go to the Build tab in Project Properties and enter the warning number in the Suppress Warnings...
Read more >
How to Disable a Warning in C++
To disable a set of warnings for a given piece of code, you have to start with a “push” pre-processor instruction, then with...
Read more >
“Disable Specific Warnings” compiler option not working
I am trying to disable Warning/Error C4996, in Visual Studio 2019, and the “Disable Specific Warnings” compiler option is not working.
Read more >
Suppress Warnings - MATLAB & Simulink - MathWorks
After you obtain the identifier from the query state, use this information to disable or enable the warning associated with that identifier. Continuing...
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