Skip to content

Commit e9d7b5a

Browse files
authored
Merge pull request #113 from maxmind/greg/run-black
Run new black version against repo
2 parents fc82e5e + 169b84e commit e9d7b5a

4 files changed

Lines changed: 17 additions & 13 deletions

File tree

minfraud/webservice.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,18 @@ def _exception_for_4xx_status(
132132
uri,
133133
raw_body,
134134
)
135-
else:
136-
if "code" in decoded_body and "error" in decoded_body:
137-
return self._exception_for_web_service_error(
138-
decoded_body.get("error"), decoded_body.get("code"), status, uri
139-
)
140-
return HTTPError(
141-
"Error response contains JSON but it does not "
142-
+ f"specify code or error keys: {raw_body}",
143-
status,
144-
uri,
145-
raw_body,
135+
136+
if "code" in decoded_body and "error" in decoded_body:
137+
return self._exception_for_web_service_error(
138+
decoded_body.get("error"), decoded_body.get("code"), status, uri
146139
)
140+
return HTTPError(
141+
"Error response contains JSON but it does not "
142+
+ f"specify code or error keys: {raw_body}",
143+
status,
144+
uri,
145+
raw_body,
146+
)
147147

148148
@staticmethod
149149
def _exception_for_web_service_error(

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# We should probably migrate most of setup.cfg here
2+
3+
[tool.black]
4+
# src is showing up in our GitHub linting builds. It seems to
5+
# contain deps.
6+
extend-exclude = '^/src/'

tests/test_models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ def test_score_ip_address(self):
218218
self.assertEqual(99, address.risk)
219219

220220
def test_ip_address_locales(self):
221-
222221
loc = IPAddress(
223222
{
224223
"_locales": ["fr"],

tests/test_webservice.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ def test_200_on_request_with_nones(self):
217217

218218
@httprettified
219219
def test_200_with_email_hashing(self):
220-
221220
uri = "/".join([self.base_uri, self.type])
222221

223222
httpretty.register_uri(

0 commit comments

Comments
 (0)