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

Cannot disable "x is not accessed" warnings #5

Closed
samdoran opened this issue Apr 3, 2024 · 3 comments
Closed

Cannot disable "x is not accessed" warnings #5

samdoran opened this issue Apr 3, 2024 · 3 comments

Comments

@samdoran
Copy link

samdoran commented Apr 3, 2024

Thanks for making this extension. It's great! I was able to replace several extensions with this one. I only ran into one minor issue.

Unaccessed variables and imports are shown in the Issues panel even though running pyright on the command line shows no issues. I have tried various pyright settings in the pyproject.toml file but none of them disabled these findings.

Here is a simple file to show the issue:

#!/usr/bin/env python

def myfunc(arg):
    return
Screenshot 2024-04-03 at 15 06 46

I tried adding # pyright: ignore to the line and that had no affect.

Command line output:

> pyright example.py
0 errors, 0 warnings, 0 informations

Some system information:

> pyright --version
pyright 1.1.357

> sw_vers
ProductName:		macOS
ProductVersion:		14.4.1
BuildVersion:		23E224

> nova --version
11.9
@dcwatson
Copy link
Contributor

dcwatson commented Apr 3, 2024

These are actually diagnostic hints, which up until recently Pyright has claimed that being able to disable is not necessary and should be the job of the client. However, I just had another look and found that they finally added a way!

microsoft/pyright#1118 (comment)

I've verified that I can add a setting to the extension that will disable these, so I'll get an update out in the next day or so. I've also filed a feature request for Nova to be able to filter the issues sidebar. 🤞 for 12.0.

@dcwatson
Copy link
Contributor

dcwatson commented Apr 3, 2024

Just pushed out version 1.2.1 with the new setting - give it a shot!

@dcwatson dcwatson closed this as completed Apr 3, 2024
@samdoran
Copy link
Author

samdoran commented Apr 4, 2024

Just updated and it works great! Thanks for finding that setting. I read through all the settings in the docs yesterday and there's no mention of that for the CLI options.

I was going to ask for a new release since the ruff --output-format option changed and I saw you had fixed that months ago. I was running from source but now I don't need to do that anymore.

Thanks again! This extension is great. I'll open issues/PRs if there's anything else I run into in the future.

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

No branches or pull requests

2 participants