Skip to content

No autocomplete for pybullet #663

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

Closed
rubendsa opened this issue Dec 1, 2020 · 6 comments
Closed

No autocomplete for pybullet #663

rubendsa opened this issue Dec 1, 2020 · 6 comments

Comments

@rubendsa
Copy link

rubendsa commented Dec 1, 2020

Environment data

Pylance language server 2020.11.2 (pyright 750a296b)
OSX 10.13.6
pyenv Python 3.7.3
Pybullet is installed with pip install pybullet==3.0.7

Expected behaviour

Expected behavior autocompletes available functions (identical to this: microsoft/python-language-server#482). Importing pybullet in an ipython instance autocompletes just as expected:

image

Actual behaviour

Autocomplete works for other libraries (ex: numpy), but not pybullet.
image

Autocomplete working with numpy:
image

Logs

image

@github-actions github-actions bot added the triage label Dec 1, 2020
@judej judej added the compiled label Dec 1, 2020
@github-actions github-actions bot removed the triage label Dec 1, 2020
@judej
Copy link
Contributor

judej commented Dec 3, 2020

@rubendsa, thanks for the report. The reason you don't see the completions is because pybullet is a compiled module without type stubs. Pylance cannot analyze compiled modules and cannot give you completions if there are no type stubs. My recommendation is to request the library authors to create type stubs for pybullet. thanks!

@rubendsa
Copy link
Author

Thanks @judej ! Digging a bit deeper, how is it that pycharm is able to analyze pybullet despite the lack of type stubs? Below is an example screenshot.
image

@rubendsa
Copy link
Author

rubendsa commented Dec 17, 2020

Looks like maybe pycharm is auto generating stubs based on method docstrings?
image

@jakebailey
Copy link
Member

Some analyzers will execute modules to examine their contents; this isn't something we currently do, hence the difference.

@rubendsa
Copy link
Author

I see, thanks @jakebailey !

@rohit-kumar-j
Copy link

@rubendsa , you can add the pycharm generated stub file (extracted_here) in top-level directory for vs code as a work around. Also See: bullet#3193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants