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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Can't import types from typeshed
  • Loading branch information
richardm-stripe committed Oct 18, 2023
commit 710f039473e807a83f188e20bd65051b2a23b9e1
3 changes: 1 addition & 2 deletions stripe/stripe_object.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# pyright: strict
from _typeshed import SupportsKeysAndGetItem
import datetime
import json
from copy import deepcopy
Expand Down Expand Up @@ -115,7 +114,7 @@ def last_response(self) -> Optional[StripeResponse]:

# StripeObject inherits from `dict` which has an update method, and this doesn't quite match
# the full signature of the update method in MutableMapping. But we ignore.
def update(self, update_dict: SupportsKeysAndGetItem[str, Any]) -> None: # type: ignore[override]
def update(self, update_dict: Mapping[str, Any]) -> None: # type: ignore[override]
for k in update_dict:
self._unsaved_values.add(k)

Expand Down
2931
0