-
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 errors in stdlib files #6453
Comments
I would hazard a guess that you have a pyproject.toml or a pyrightconfig.json? The errors are likely a result of this: It's forcing your typecheckingmode to default to 'basic' |
That's expected behavior then. What you're asking for is typechecking only on 1st party source and not 3rd party source it seems like? Seems reasonable to me. Why would anybody care to type check code that isn't their own? |
One way to workaround this is to add a glob to the 'ignore' setting: "python.analysis.ignore": ["${workspaceFolder}/venv/**/*"] |
Maybe we should add all of the site-packages folders to the default ignore list? |
we show errors from any file opened in you could request |
Feels like this scenario is common enough that ignoring the standard library would be a reasonable default. When would you want these errors to show up? |
standard library typeshed authors? it would be nice to have a way to categorize problems in UI. so less important errors can group differently than other more important errors. |
Having an option (with no errors reported by default) seems reasonable for the majority of users |
we could add an option for it, but usually user doesn't leave stdlib file open for long time? they usually either open it to see some definition/signature and close it. what is the scenario where you leave them open for long time? |
Yes that's exactly the problem I ran into:
|
I would love to see everything in stdlib/venv get excluded. It's just pointless distraction. |
I'm struggling to configure VS Code to ignore the errors from the stdlib. I have this in settings.json: "python.analysis.ignore": [
"${workspaceFolder}/.venv",
"**/python3.*"
], The errors are showing up in files with paths like: (.venv/bin/python is a symlink to /opt/homebrew/Cellar/[email protected]/3.11.9_1/Frameworks/Python.framework/Versions/3.11/bin/python3.11) I'd like to not hard-code python3.11 or homebrew in the settings, ideally. Any tips? |
go to definition
onjoin
fromos.path
Bug
My problem count explodes:
I wouldn't expect analysis to kick in for files from the standard library like this
The text was updated successfully, but these errors were encountered: