Skip to content
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

Type stubs missing #89

Open
swelborn opened this issue Jun 13, 2024 · 1 comment
Open

Type stubs missing #89

swelborn opened this issue Jun 13, 2024 · 1 comment

Comments

@swelborn
Copy link
Contributor

Hello! I am doing some development with pvaccess/pvapy, and I have found my IDE (vscode) cannot find the symbols associated with pvaccess:

image

I generated them using mypy:

pip install mypy
stubgen -m pvaccess
mv out/pvaccess.pyi /path/to/pvacess/site-packages/dir/

This fixes the issue (still unknown args, but better than having red lines everywhere in my IDE):
image

@swelborn
Copy link
Contributor Author

swelborn commented Jul 2, 2024

Want to note that you have to run the stubgen from within the site-packages dir

cd /path/to/pvaccess/
stubgen -m pvaccess
mv out/pvaccess.pyi .

So your dir should look like

~/.cache/pypoetry/virtualenvs/pva2hpc-NH_X-I2N-py3.11/lib/python3.11/site-packages/pvaccess$ ls
dbd  doc  __init__.py  lib  out  pvaccess.pyi  pvaccess.so  __pycache__

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

1 participant