Skip to content

Commit a706d4a

Browse files
committedMar 17, 2025·
fix: lint
1 parent e81bc9f commit a706d4a

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed
 

‎easypost/services/beta_referral_customer_service.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import (
22
Any,
3+
Optional,
34
)
45

56
from easypost.easypost_object import convert_to_easypost_object
@@ -67,7 +68,7 @@ def refund_by_payment_log(self, payment_log_id: str) -> dict[str, Any]:
6768

6869
return convert_to_easypost_object(response=response)
6970

70-
def create_credit_card_client_secret(self) -> Dict[str, Any]:
71+
def create_credit_card_client_secret(self) -> dict[str, Any]:
7172
"""Creates a client secret to use with Stripe when adding a credit card."""
7273
response = Requestor(self._client).request(
7374
method=RequestMethod.POST,
@@ -77,9 +78,7 @@ def create_credit_card_client_secret(self) -> Dict[str, Any]:
7778

7879
return convert_to_easypost_object(response=response)
7980

80-
def create_bank_account_client_secret(
81-
self, return_url: Optional[str] = None
82-
) -> Dict[str, Any]:
81+
def create_bank_account_client_secret(self, return_url: Optional[str] = None) -> dict[str, Any]:
8382
"""Creates a client secret to use with Stripe when adding a bank account."""
8483
params = {"return_url": return_url}
8584

‎easypost/services/referral_customer_service.py

+6-11
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
)
66

77
import requests
8-
98
from easypost.constant import (
109
_FILTERS_KEY,
1110
SEND_STRIPE_DETAILS_ERROR,
@@ -70,13 +69,9 @@ def all(self, **params) -> dict[str, Any]:
7069

7170
url = "/referral_customers"
7271

73-
response = Requestor(self._client).request(
74-
method=RequestMethod.GET, url=url, params=params
75-
)
72+
response = Requestor(self._client).request(method=RequestMethod.GET, url=url, params=params)
7673

77-
response[_FILTERS_KEY] = (
78-
filters # Save the filters used to reference in potential get_next_page call
79-
)
74+
response[_FILTERS_KEY] = filters # Save the filters used to reference in potential get_next_page call
8075

8176
return convert_to_easypost_object(response=response)
8277

@@ -107,7 +102,7 @@ def add_credit_card(
107102
expiration_year: int,
108103
cvc: str,
109104
priority: str = "primary",
110-
) -> Dict[str, Any]:
105+
) -> dict[str, Any]:
111106
"""Add a credit card to EasyPost for a ReferralCustomer without needing a Stripe account.
112107
113108
This function requires the ReferralCustomer User's API key.
@@ -138,7 +133,7 @@ def add_credit_card_from_stripe(
138133
referral_api_key: str,
139134
payment_method_id: str,
140135
priority: str = "primary",
141-
) -> Dict[str, Any]:
136+
) -> dict[str, Any]:
142137
"""Add a credit card to EasyPost for a ReferralCustomer with a payment method ID from Stripe.
143138
144139
This function requires the ReferralCustomer User's API key.
@@ -166,9 +161,9 @@ def add_bank_account_from_stripe(
166161
self,
167162
referral_api_key: str,
168163
financial_connections_id: str,
169-
mandate_data: Dict[str, Any],
164+
mandate_data: dict[str, Any],
170165
priority: str = "primary",
171-
) -> Dict[str, Any]:
166+
) -> dict[str, Any]:
172167
"""Add a bank account to EasyPost for a ReferralCustomer.
173168
174169
This function requires the ReferralCustomer User's API key.

0 commit comments

Comments
 (0)