Packaging Python stub files (*.pyi) in a module

Viewed 1127

I am trying to create a Python package with *.pyi stub files but my editor, VS Code, is ignoring my efforts. It isn't clear to me how to properly create a Python package with stubs.

The root dir of my package contains these files:

__init__.py
__init__.pyi
py.typed

I am including py.typed in the setup.py package_data and when I build and install the package I see all of those files are in fact installed by pip. But when I restart VS Code and test, the code completion looks the same as before. I've read through PEP 484 and PEP 561 and I don't see what I am missing.

I know from other StackOverflow threads that I need to make sure Jedi is turned off and am using Microsoft's IntelliCode functionality. What am I doing wrong?

0 Answers
Related