Skip to content

Commit a5cb37f

Browse files
committed
fix: run black
1 parent 6fbd6c6 commit a5cb37f

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

tests/test_cli.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def setUp(self):
4949
}
5050
}
5151
self.response_mock = response_mock
52-
self.expected_output = u"""{
52+
self.expected_output = """{
5353
"url": "https://api.trustpilot.com/v1/business-units/5400267300006400057a0113/reviews",
5454
"status": 401,
5555
"content": {
@@ -62,7 +62,7 @@ def setUp(self):
6262
}
6363
}
6464
"""
65-
self.expected_verbose_output = u"""{
65+
self.expected_verbose_output = """{
6666
"url": "https://api.trustpilot.com/v1/business-units/5400267300006400057a0113/reviews",
6767
"status": 401,
6868
"headers": {
@@ -106,7 +106,6 @@ def test_create_access_token(self, client_mock):
106106
@mock.patch("trustpilot.cli.client", autospec=True)
107107
@mock.patch("trustpilot.cli.auth")
108108
def test_no_verbosity_with_get(self, auth_mock, client_mock):
109-
110109
client_mock.get.return_value = self.response_mock
111110

112111
result = self.runner.invoke(
@@ -278,7 +277,6 @@ def assert_output_equal(self, output, expected_output):
278277
@mock.patch("trustpilot.cli.client", autospec=True)
279278
@mock.patch("trustpilot.cli.auth")
280279
def test_no_verbosity_with_get(self, auth_mock, client_mock):
281-
282280
client_mock.get.return_value = self.response_mock
283281

284282
result = self.runner.invoke(

trustpilot/async_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def setup(
3030
user_agent=None,
3131
**kwargs
3232
):
33-
3433
self.api_host = api_host or environ.get(
3534
"TRUSTPILOT_API_HOST", "https://api.trustpilot.com"
3635
)
@@ -113,7 +112,6 @@ async def post(self, url, *args, **kwargs):
113112
return await self.authenticated_request("post", url, *args, **kwargs)
114113

115114
async def get(self, url, *args, **kwargs):
116-
117115
return await self.authenticated_request("get", url, *args, **kwargs)
118116

119117
async def put(self, url, *args, **kwargs):

trustpilot/client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def setup(
5050
user_agent=None,
5151
**kwargs
5252
):
53-
5453
self.api_host = api_host or environ.get(
5554
"TRUSTPILOT_API_HOST", "https://api.trustpilot.com"
5655
)
@@ -112,7 +111,10 @@ def _post_request_callback(self, response, *args, **kwargs):
112111
req = response.request
113112
retry = getattr(req, "authentication_retry", True)
114113

115-
if retry and response.status_code in (requests.codes.unauthorized, requests.codes.forbidden):
114+
if retry and response.status_code in (
115+
requests.codes.unauthorized,
116+
requests.codes.forbidden,
117+
):
116118
logger.debug(
117119
{"message": "reauthenticating and retrying once", "url": req.url}
118120
)

0 commit comments

Comments
 (0)