Skip to content

Does pyright --createstub work with compiled modules? (.pyd files) #1664

Answered by erictraut
neelkarma asked this question in Q&A
Discussion options

You must be logged in to vote

No, pyright's --createstub doesn't work with compiled modules. You'll need to use stubgen for that, but the amount of type information available in a compiled module is small, so the resulting stubs will be very low quality. You'll need to fill in a lot of information manually to make them work for type checking. In my experience, writing such stubs from scratch is a better approach.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by neelkarma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants