-
Notifications
You must be signed in to change notification settings - Fork 768
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
Don't show settingsNotOverridable if vscode settings file has a larger scope than the current project #6428
Comments
The global settings won't apply in the current workspace, so it makes sense for the error to show up there too. Maybe we should change the wording on the error message. |
i'm aware it wont apply. Making that an error makes no sense to me. I don't get errors when overwriting other user settings in a workspace settings.json. So why shoupd i get errors overwriting these specific ones with a project config? no other vscode extension works like this. its just annoying error messages where none are needed. |
Because the errors indicate your settings don't work. Regardless of where they are, if there is a pyrightconfig.json file, no settings.json settings will apply (for the settings that come from pyrightconfig.json). So it doesn't matter if they're global or if they're in a workspace settings.json, they don't get applied to Pylance. I think I'm misunderstanding your issue. Do you not want to know that your settings won't apply? As in you don't care? Maybe it should be a warning instead of an error. |
Well, yeah? It's what basically all other tools do. Hierarchical configs are extremely common and basically never lead to warnings/errors about their intended behaviour - more specific config files overwriting less specific ones. Let's look at default VS Code behaviour:
I'll use workspace and user/profile since the others have various special cases If I define It's the same with any hierarchical configuration I'm aware of. There are no errors or warnings if a more specific config changes the more general one. Pylance is the first tool which I've come across which does this, and the fact that it shows up like a problem with my project, the same way, for example, type errors would, is annoying. I just always have these errors sitting there which are reported the exact same way as errors I SHOULD fix, but these I CANNOT fix. They clutter the problems tab and force me to scroll down to reach actual problems. |
Seems like these errors should be warnings (or grayed out somehow) in the global settings then. Cause the settings are likely are on purpose, so you shouldn't be removing those settings as you said. |
I have a few python.analysis settings in my user settings.json in vscode. I use these for projects which do not specify pylance settings in pyproject.toml. This means i cannot remove these lines from my user settings.json without affecting a lot of projects.
These lines are being reported as settingsNotOverridable when a project is opened which does have a pyproject.toml. This is quite annoying, as they show up in the same context as problems with my projects code.
I'm not sure what a viable solution to this is, but settingsNotOverridable should not happen for user/global settings.json. It only makes sense for project-specific settings.json.
The text was updated successfully, but these errors were encountered: