Skip to content

Dealing with untyped packages/libraries #8101

Closed Answered by erictraut
omar-abdelgawad asked this question in Q&A
Discussion options

You must be logged in to vote

The best way to deal with untyped libraries is to create type stubs for the library in question. For details, refer to this documentation. You can provide type information for the subset of the library that you use and leave the remaining unannotated. If you create a full type stub, it would be great if you could contribute it back to the maintainers of the library so they can include the stub in their distribution. This would save other users of the library the hassle of duplicating the work in creating a type stub.

If you don't want to create a type stub file, you can still use the the library with pyright. However, you won't get the full benefits of type checking because pyright will n…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@omar-abdelgawad
Comment options

Answer selected by omar-abdelgawad
Comment options

You must be logged in to vote
2 replies
@erictraut
Comment options

@omar-abdelgawad
Comment options

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