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.

reportUnusedVariable is enabled by default and can not be disabled

See original GitHub issue

This plugin marks unused variables, hovewer, reportUnusedVariable is disabled by default.

Like in this example:

def test(param):
    pass

image

i tried to disable it by adding this to CocConfig:

  "python.analysis.diagnosticSeverityOverrides": {
    "reportUnusedVariable": "none"
  },

But it does not works.

Does this looks like plugin problem, or maybe i should create issue in pyright repo?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
last-partizancommented, Aug 26, 2020

@yaegassy thank you.

For now i configured another workaround - i was using coc-diagnostic-next to jump between errors, but i switched to coc-diagnostic-next-error, so i can jump only to errors and able to see warnings also.

0reactions
yaegassycommented, Aug 25, 2020

@fannheyward @last-partizan

As for the current situation of coc-pyright and pyright itself, the only way to disable the diagnostic “hint messages” is to set the diagnostic.level to information or higher (warning or error).

You might want to use :CocLocalConfig to create and configure a “project-level” .vim/coc-settings.json.


.vim/coc-settings.json

{
  "diagnostic.level": "information"
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Unused parameter only greyed out but not reported
currently, thanks to the parameter reportUnusedVariable in pyright, we can report unused variables, but we cannot report unused parameters.
Read more >
Settings Reference for Python - Visual Studio Code
Python settings reference. The Python Extension for Visual Studio Code is highly configurable. This page describes the key settings you can work with....
Read more >
Best Practices | PMD Source Code Analyzer
The rule subsumes UnusedLocalVariable , and UnusedFormalParameter . Those violations are filtered out by default, in case you already have enabled those rules, ......
Read more >
https://raw.githubusercontent.com/microsoft/pyrigh...
If no paths are specified, pyright defaults to the directory that contains ... Instead, it can be specified on the command line or...
Read more >
List of C/C++ inspections | CLion Documentation - JetBrains
Detects the for , while , and goto statements that can break only by ... This inspection is disabled by default on Windows...
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