diff --git a/stripe/api_resources/source.py b/stripe/api_resources/source.py index 074062202..db910d796 100644 --- a/stripe/api_resources/source.py +++ b/stripe/api_resources/source.py @@ -36,7 +36,8 @@ def detach(self, idempotency_key=None, **params): ) def source_transactions(self, **params): - """source_transactions is deprecated, use Source.list_source_transactions instead.""" + """source_transactions is deprecated, use Source.list_source_transactions instead. + """ return self.request( "get", self.instance_url() + "/source_transactions", params ) diff --git a/stripe/api_resources/subscription_item.py b/stripe/api_resources/subscription_item.py index e601b8523..748d39c13 100644 --- a/stripe/api_resources/subscription_item.py +++ b/stripe/api_resources/subscription_item.py @@ -22,7 +22,8 @@ class SubscriptionItem( OBJECT_NAME = "subscription_item" def usage_record_summaries(self, **params): - """usage_record_summaries is deprecated, use SubscriptionItem.list_usage_record_summaries instead.""" + """usage_record_summaries is deprecated, use SubscriptionItem.list_usage_record_summaries instead. + """ return self.request( "get", self.instance_url() + "/usage_record_summaries", params ) diff --git a/stripe/oauth_error.py b/stripe/oauth_error.py index 35f658700..b755b05cf 100644 --- a/stripe/oauth_error.py +++ b/stripe/oauth_error.py @@ -22,10 +22,8 @@ def construct_error_object(self): if self.json_body is None: return None - return ( - stripe.api_resources.error_object.OAuthErrorObject.construct_from( - self.json_body, stripe.api_key - ) + return stripe.api_resources.error_object.OAuthErrorObject.construct_from( + self.json_body, stripe.api_key ) diff --git a/tests/test_integration.py b/tests/test_integration.py index fe3b64721..fe8c1a679 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -134,10 +134,8 @@ def do_GET(self): self.setup_mock_server(MockServerRequestHandler) - stripe.default_http_client = ( - stripe.http_client.new_default_http_client( - proxy="http://localhost:%s" % self.mock_server_port - ) + stripe.default_http_client = stripe.http_client.new_default_http_client( + proxy="http://localhost:%s" % self.mock_server_port ) stripe.Balance.retrieve() assert MockServerRequestHandler.num_requests == 1 diff --git a/tox.ini b/tox.ini index bd1f21fa0..722771e21 100644 --- a/tox.ini +++ b/tox.ini @@ -37,7 +37,7 @@ passenv = LDFLAGS CFLAGS [testenv:fmt] description = run code formatting using black basepython = python3.9 -deps = black==20.8b1 +deps = black==19.3b0 commands = black . {posargs} skip_install = true