Comments (9)
Is the numpy lib in pyright path? Check lsp-pyright-extra-paths
or extraPaths
in pyrightconfig.json? See https://github.com/microsoft/pyright/blob/master/docs/configuration.md.
from lsp-pyright.
Is the numpy lib in pyright path? Check
lsp-pyright-extra-paths
orextraPaths
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:
And code completion somehow works but not all functions are displayed:
So, seems the library is available in some part.
from lsp-pyright.
from lsp-pyright.
Please pass in the --lib option when running from the shell.
If you mean pyright
then it works from shell as expected.
from lsp-pyright.
from lsp-pyright.
Could you share the output when passing in the --lib option?
Yes, I got it
pyr$ pyright --lib
4:11 - error: "sign" is not a known member of module (reportGeneralTypeIssues)
1 error, 0 warnings, 0 infos
Should I just disable useLibraryCodeForTyoes
or there is some config that should be done?
from lsp-pyright.
Disabling useLibraryCodeForTypes
will also disable auto-completion for numpy
. You might want to filter errors (like unknown member etc) for your project.
from lsp-pyright.
@zeronone how would one filter errors like that?
from lsp-pyright.
@orlandini check this page? https://github.com/microsoft/pyright/blob/main/docs/configuration.md#diagnostic-rule-defaults
from lsp-pyright.
Related Issues (20)
- How specify Python interpreter with elisp HOT 3
- Documentation not working HOT 5
- How can I change the pyright's initialized folder path? HOT 4
- How to unimport or remove an imported folder? HOT 1
- Is it possible to expose reveal_type on selection?
- wrong-type-argument hash-table-p on pyright startup HOT 5
- _T@abs error
- How to turn on foldingRange HOT 1
- lsp-mode doesn't seem to try to load pyright when opening python file HOT 4
- Request: Support for `python-ts-mode` HOT 1
- Auto import not working anymore HOT 2
- Inconsistent/random/non-deterministic choice of variable faces
- stub file not read when checking buffer HOT 1
- [Bug] lsp-request: Timeout while waiting for response HOT 1
- Emacs lsp-pyright can not complete print function HOT 2
- support multiple venvs in a monorepo
- Why is textDocument/implementation not implemented?
- How to set PYTHONPATH for python shell based on project root?
- (🎁) Support basedpyright
- lsp-pyright server crashes HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp-pyright.