8000 Even more type annotations by richardm-stripe · Pull Request #1088 · stripe/stripe-python · GitHub
[go: up one dir, main page]

Skip to content

Even more type annotations #1088

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

Merged
merged 20 commits into from
Oct 18, 2023
Merged

Even more type annotations #1088

merged 20 commits into from
Oct 18, 2023

Conversation

richardm-stripe
Copy link
Contributor
@richardm-stripe richardm-stripe commented Oct 18, 2023

In this one, the goal is to fully type StripeObject. I add # pyright: strict to the top, and also make sure every method has a return annotation. Now, pyright --verifytypes no longer complains about Type of base class "stripe.stripe_object.StripeObject" is partially unknown for the (many) classes that inherit from StripeObject.

The really hard thing, that I haven't been ready to tackle yet, is coming up with good types for stripe.http_client, so there are some pretty unsatisfying Any and casts in this one, but I'm hoping that adding types around the periphery will make it easier to tackle eventually.

Pyright reports

Type completeness score: 96.1%

after this (up from 94.3%)

@richardm-stripe richardm-stripe changed the title More type annotations Even more type annotations Oct 18, 2023
@richardm-stripe richardm-stripe changed the base branch from richardm-more-types-2 to master October 18, 2023 19:32
@richardm-stripe richardm-stripe enabled auto-merge (squash) October 18, 2023 21:57
@richardm-stripe richardm-stripe merged commit e8cb141 into master Oct 18, 2023
@richardm-stripe richardm-stripe deleted the richardm-more-types-3 branch October 18, 2023 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0