Enable inline type annotations in the beta channel
- This release enables type annotations in the beta channel including types for resources, methods, properties, and parameters.
- Some type annotations on "infrastructure" (such as http_client) are still a work
in progress. - We do not consider the type annotations to be part of the library's "stable" interface. We may change the types in a way that changes the type errors you experience in a minor release.
- Please report inaccurate types. Contributions are welcome to non-generated files (check for a comment near the top of the file).
To use the inline type annotations:
- make sure you don't have a stubs library types-stripe installed (
pip uninstall types-stripe
). - make sure you don't have
typings/stripe
stubs set up in your project directory - the inline annotations should take precedence over everything else
To ignore the inline type annotations:
pip install types-stripe
might be a quick fix. The stubs are outdated but much less opinionated so they might make unwanted type errors go away. This isn't a permanent solution however.- Suppress errors with
# type: ignore
. - Register your own stubs locally in your project beneath
typings/stripe