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

No docstrings or autocomplete in vscode, windows install #312

Open
Jugbot opened this issue Nov 8, 2022 · 3 comments
Open

No docstrings or autocomplete in vscode, windows install #312

Jugbot opened this issue Nov 8, 2022 · 3 comments

Comments

@Jugbot
Copy link

Jugbot commented Nov 8, 2022

Sorry if this is already expected behavior but when installing via conda environment
conda install -c conda-forge tesserocr
I am able to execute successfully but don't see intellisense (Pylance) docs or type information?
image

@Jugbot
Copy link
Author

Jugbot commented Nov 8, 2022

Answering my own question, looks like this is intended.
microsoft/pylance-release#242

Apparently types can be stubbed with a pyi file https://github.com/microsoft/python-type-stubs

@tangorcraft
Copy link

I had similar problem, so I made a pyi file (there may be some errors though), but I don't know where do I put it in this project. In installed package I just put it at Python38\Lib\site-packages\tesserocr\__init__.pyi
init.zip
Will be good if someone could add it to the project (and maybe check for errors in functions return types)

@sirfz
Copy link
Owner

sirfz commented Nov 21, 2022

I believe you can add the .pyi file in the package_data parameter of the setup function in setup.py, a PR is welcome

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

Successfully merging a pull request may close this issue.

3 participants