-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add code action to ignore current error? #993
Comments
i've thought about this before, but i'm hesitant to add this because i've seen other tools do it and it seems to encourage users to just apply the code action to suppress the error without thinking about it. from what i've seen, forcing the user to write the ignore comment manually encourages them to consider whether or not that's really the best solution. maybe we can add the functionality but with an option to turn it off |
For me, most of time whenever I saw a unsolvable lint, I think carefully, then look up the code(because Zed does not show it in the popup), and type the comment. I think most people who use baesdpyright do care about type checking as it is stricter and more accurate than pyright. So most of them will not apply the code action blindly otherwise they won’t prefer basedpyright. |
that's a fair point. i guess my experience is with my team at work who i've forced to use basedpyright, as well as linters like ruff on the strictest settings. many of them probably would turn them all off if they had the choice lol also worth keeping in mind that i believe the majority of basedpyright users still turn off most of the type checking and only care about language server features like autocomplete, semantic highlighting, etc.. to many people, basedpyright is just a language server and they couldn't care less about type checking. but i guess those users won't be seeing these diagnostics anyway |
only include the option when type checking is set to |
I think it would be better if you add this option, but it should be disabled by default. Developers who really need it (who know how to write code) can read the docs and enable this feature. |
basedpyright
's type checking is helpful, but sometime I'd just want to ignore the error for the 3rd library without manually typing# pyright: ignore[reportUnknownVariableType,reportUnknownMemberType]
...The text was updated successfully, but these errors were encountered: