-
Notifications
You must be signed in to change notification settings - Fork 13
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
How to add the current project path to "python.analysis.extraPaths", currently using version 1.3.1 #324
Comments
We do have some logics for |
Since your description is pretty specific, how do you find LSP-pyright adds the current project path to |
Didn't see |
In the previous version, my custom module could be imported normally, but in this latest version, my project's custom module cannot be recognized. |
Could you provide a minimal reproducer repository (or uploading a |
ok,I'll pack it up |
test.zip |
It will be recognized in previous versions |
// Settings in here override those in "LSP-pyright/LSP-pyright.sublime-settings"
{
"settings": {
"python.analysis.extraPaths": [
"F:\\miniconda3\\Lib",
"F:\\miniconda3\\Lib\\site-packages",
"./"
],
"python.analysis.autoSearchPaths": true,
"python.analysis.stubPath": "./typings",
"python.analysis.diagnosticMode": "workspace",
"python.analysis.diagnosticSeverityOverrides": {
"reportUnboundVariable": "none",
"reportGeneralTypeIssues": "information",
"reportOptionalMemberAccess": "none",
"reportUnusedImport": "warning"
},
"python.analysis.typeshedPaths": [
"."
],
"python.analysis.typeCheckingMode": "off",
"pyright.disableOrganizeImports": true,
"python.pythonPath": "F:\\miniconda3\\python.exe",
"python.venvPath": ".",
}
} |
Still can't reproduce, even with the exact plugin settings. // Settings in here override those in "LSP-pyright/LSP-pyright.sublime-settings"
{
"settings": {
"python.analysis.extraPaths": [
"C:\\Users\\jfcherng\\AppData\\Local\\Programs\\Python\\Python38\\Lib",
"C:\\Users\\jfcherng\\AppData\\Local\\Programs\\Python\\Python38\\Lib\\site-packages",
"./"
],
"python.analysis.autoSearchPaths": true,
"python.analysis.stubPath": "./typings",
"python.analysis.diagnosticMode": "workspace",
"python.analysis.diagnosticSeverityOverrides": {
"reportUnboundVariable": "none",
"reportGeneralTypeIssues": "information",
"reportOptionalMemberAccess": "none",
"reportUnusedImport": "warning"
},
"python.analysis.typeshedPaths": [
"."
],
"python.analysis.typeCheckingMode": "off",
"pyright.disableOrganizeImports": true,
"python.pythonPath": "C:\\Users\\jfcherng\\AppData\\Local\\Programs\\Python\\Python38\\python.exe",
"python.venvPath": ".",
}
} |
This hasn't been answered yet. |
Someone probably has the same issue: microsoft/pyright#7016 (comment) |
What I use is LSP-pyright 1.3.1 |
@jfcherng How to roll back to the previous version or a specific version |
I guess basically you want Package Control to not manage it.
Or just overwrite language-server to an old version. |
The status of version 1.3.2 is the same, and the reconfiguration is also the same, o(╥﹏╥)o |
Have you found a working old version yet? |
I don’t know how to roll back. After setting it up according to your method, it didn’t roll back to the previous version. |
It prevents package control from managing (updating) it. It won't do rollback. It's you who have to do the rollback. |
If you decompress it, it's LSP-pyright-1.3.2, you have to rename it as LSP-pyright and put it under Packages.
And if you are familiar with git, you will know you can do this with git and quickly switch among versions. |
Just to confirm. |
yes。The latter two versions of these two plug-ins do not work normal, whether it is a clean system or a safe mode |
By the way, I replaced package.json and package-lock.json in LSP-basedpyright 1.1.0 with the same files in 1.1.2, and the result is that it runs perfectly. It seems that it is not an upstream problem. Please help to see if there is a setting problem |
Could you try this: https://github.com/sublimelsp/LSP-pyright/archive/refs/heads/fix/import-not-found.zip I doubt it may be fixed by 273a22c. This is the only behavior change that I notice between v1.3.0 and v1.3.1: 1.3.0...1.3.1 |
sorry,Still not working |
Unfortunately, I still can't spot other behavior different between 1.3.0...1.3.1. |
Could you provide LSP-pyright's initialization logs (in LSP's log panel) for both v1.3.0 and v1.3.1 on your side? |
I will create a new clean version and send it to you. |
Appreciated. |
lsp-pyright-logs.zip |
I have determined that in my case, it is a problem with the upstream language-server. I still use 1.3.0 |
You mean this is a |
Thanks for providing these information. But I need logs both when working and when not working, so we can find the difference. |
diff.zip |
OK (1.1.0?)
FAILED (1.1.5?)
Expected to be failed but I doubt they are run under the exact same setup. I think they have some fundamental differences so that I don't think they are run under the same setup. Hence I would expect the only environment difference when running for logs is the version number of LSP-basedpyright or LSP-pyright. Same ST workspace, plugin settings, project settings, same opened file etc... except that one uses LSP-basedpyright v1.1.0 and the other uses v1.1.5. |
before the version 1.3.1,it's auto include it
The text was updated successfully, but these errors were encountered: