-
Notifications
You must be signed in to change notification settings - Fork 25
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
lsp pyright errors #30
Comments
Is the numpy lib in pyright path? Check |
I added the next
but without any effect. And I'm confused of need such configuration because I still can get some correct information from lsp: And code completion somehow works but not all functions are displayed: So, seems the library is available in some part. |
Please pass in the --lib option when running from the shell.
…On Thu, Oct 22, 2020, 7:07 AM sdorof1 ***@***.***> wrote:
Is the numpy lib in pyright path? Check lsp-pyright-extra-paths or
extraPaths in pyrightconfig.json?
I added the next pyrightconfig.json to project folder:
{
"executionEnvironments": [
{
"root": "src"
"extraPaths": [
"~/.pyenv/versions/3.8.1/lib/python3.8/site-packages/"
]
}
]
}
but without any effect. And I'm confused of need such configuration
because numpy is not an some extra but as a rule system lib. It is
available on python path and the program works correctly both from shell
and emacs. Did I understand you correctly about configuration?
I still can get some correct information from lsp:
[image: Снимок экрана от 2020-10-22 00-41-46]
<https://user-images.githubusercontent.com/6806825/96791708-9ad36480-1401-11eb-9bf8-2b81434fa937.png>
And code completion somehow works but not all functions are displayed:
[image: Снимок экрана от 2020-10-22 01-00-26]
<https://user-images.githubusercontent.com/6806825/96791903-00bfec00-1402-11eb-8088-bbf927072b0a.png>
So, seems the library is available in some part.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOSBAJP5UWG4CIEQ52TVOLSL5LR7ANCNFSM4SY5MXOA>
.
|
If you mean |
I meant we enable useLibraryCodeForTyoes by default. If you want to get
same results when running pyright from the shell, you also need to pass in
the --lib option.
Could you share the output when passing in the --lib option?
…On Thu, Oct 22, 2020, 8:23 AM sdorof1 ***@***.***> wrote:
Please pass in the --lib option when running from the shell.
If you mean pyright then it works from shell as expected.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOSBALHCGJF2FU52O43MT3SL5UPRANCNFSM4SY5MXOA>
.
|
Yes, I got it
Should I just disable |
Disabling |
@zeronone how would one filter errors like that? |
For the next code (which runs without errors):
I got the error with pyright in emacs:
But if I run pyright in the shell, it doesn't report any errors:
So, I get a some mystic error report. This is also in other cases, for example, when work with
pandas
, when no pyright itself, no vscode doesn't reports any errors.The value of
lsp-pyright-typechecking-mode
isbasic
for all cases.The text was updated successfully, but these errors were encountered: