-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add overload annotation for stripe DeletableAPIResource delete classmethod #7230
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
Add overload annotation for stripe DeletableAPIResource delete classmethod #7230
Conversation
stubs/stripe/stripe/api_resources/abstract/deletable_api_resource.pyi
Outdated
Show resolved
Hide resolved
I fixed the lint error, but it looks like pytype is unhappy about having |
Actually there's another lint error too—you should use |
@JelleZijlstra I want to fake having a class method and an instance method with the same name, which is weird and it makes sense that |
Would annotating it as only a classmethod work? Classmethods can still be called on instances. |
I think it's easiest to add the following to |
stubs/stripe/stripe/api_resources/abstract/deletable_api_resource.pyi
Outdated
Show resolved
Hide resolved
…rce.pyi Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Similar to python#7230, stripe.PaymentIntent.confirm can be called as an instance method or a classmethod. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Similar to python#7230, stripe.PaymentIntent.confirm can be called as an instance method or a classmethod. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Similar to python#7230, stripe.PaymentIntent.confirm can be called as an instance method or a classmethod. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Similar to python#7230, stripe.PaymentIntent.confirm can be called as an instance method or a classmethod. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Similar to python#7230, stripe.PaymentIntent.confirm can be called as an instance method or a classmethod. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Similar to python#7230, stripe.PaymentIntent.confirm can be called as an instance method or a classmethod. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Similar to python#7230, stripe.PaymentIntent.confirm can be called as an instance method or a classmethod. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Similar to python#7230, stripe.PaymentIntent.confirm can be called as an instance method or a classmethod. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Similar to python#7230, stripe.PaymentIntent.confirm can be called as an instance method or a classmethod. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Similar to python#7230, stripe.PaymentIntent.confirm can be called as an instance method or a classmethod. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Similar to python#7230, stripe.PaymentIntent.confirm can be called as an instance method or a classmethod. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
Fixes stripe/stripe-python#770
stripe
'sDeletableAPIResource.delete
instance method has a wrapper that effectively overloads the method to add a class method version.Both
and
should work, but the latter raises a type error.