Skip to content

Commit beda13e

Browse files
committed
Run recent version of black against code
1 parent 77c926d commit beda13e

File tree

3 files changed

+50
-12
lines changed

3 files changed

+50
-12
lines changed

geoip2/database.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ class Reader:
5656
``geoip2.errors.AddressNotFoundError`` exception will be thrown. If the
5757
database is corrupt or invalid, a ``maxminddb.InvalidDatabaseError`` will
5858
be thrown.
59-
60-
"""
59+
"""
6160

6261
def __init__(
6362
self, fileish: str, locales: Optional[List[str]] = None, mode: int = MODE_AUTO

geoip2/webservice.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,11 @@ def __init__( # pylint: disable=too-many-arguments
254254
timeout: float = 60,
255255
) -> None:
256256
super().__init__(
257-
account_id, license_key, host, locales, timeout,
257+
account_id,
258+
license_key,
259+
host,
260+
locales,
261+
timeout,
258262
)
259263

260264
async def city(self, ip_address: IPAddress = "me") -> City:

tests/models_test.py

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,22 @@ def test_insights_full(self) -> None:
4040
"population_density": 1341,
4141
"time_zone": "America/Chicago",
4242
},
43-
"postal": {"code": "55401", "confidence": 33,},
43+
"postal": {
44+
"code": "55401",
45+
"confidence": 33,
46+
},
4447
"subdivisions": [
4548
{
4649
"confidence": 88,
4750
"geoname_id": 574635,
4851
"iso_code": "MN",
4952
"names": {"en": "Minnesota"},
5053
},
51-
{"geoname_id": 123, "iso_code": "HP", "names": {"en": "Hennepin"},},
54+
{
55+
"geoname_id": 123,
56+
"iso_code": "HP",
57+
"names": {"en": "Hennepin"},
58+
},
5259
],
5360
"registered_country": {
5461
"geoname_id": 2,
@@ -248,7 +255,10 @@ def test_city_full(self) -> None:
248255
"iso_code": "CA",
249256
"names": {"en": "Canada"},
250257
},
251-
"traits": {"ip_address": "1.2.3.4", "is_satellite_provider": True,},
258+
"traits": {
259+
"ip_address": "1.2.3.4",
260+
"is_satellite_provider": True,
261+
},
252262
}
253263
model = geoip2.models.City(raw)
254264
self.assertEqual(type(model), geoip2.models.City, "geoip2.models.City object")
@@ -331,13 +341,36 @@ def test_unknown_keys(self) -> None:
331341
model = geoip2.models.City(
332342
{
333343
"city": {"invalid": 0},
334-
"continent": {"invalid": 0, "names": {"invalid": 0},},
335-
"country": {"invalid": 0, "names": {"invalid": 0},},
344+
"continent": {
345+
"invalid": 0,
346+
"names": {"invalid": 0},
347+
},
348+
"country": {
349+
"invalid": 0,
350+
"names": {"invalid": 0},
351+
},
336352
"location": {"invalid": 0},
337353
"postal": {"invalid": 0},
338-
"subdivisions": [{"invalid": 0, "names": {"invalid": 0,},},],
339-
"registered_country": {"invalid": 0, "names": {"invalid": 0,},},
340-
"represented_country": {"invalid": 0, "names": {"invalid": 0,},},
354+
"subdivisions": [
355+
{
356+
"invalid": 0,
357+
"names": {
358+
"invalid": 0,
359+
},
360+
},
361+
],
362+
"registered_country": {
363+
"invalid": 0,
364+
"names": {
365+
"invalid": 0,
366+
},
367+
},
368+
"represented_country": {
369+
"invalid": 0,
370+
"names": {
371+
"invalid": 0,
372+
},
373+
},
341374
"traits": {"ip_address": "1.2.3.4", "invalid": "blah"},
342375
"unk_base": {"blah": 1},
343376
}
@@ -374,7 +407,9 @@ class TestNames(unittest.TestCase):
374407
"zh-CN": "美国",
375408
},
376409
},
377-
"traits": {"ip_address": "1.2.3.4",},
410+
"traits": {
411+
"ip_address": "1.2.3.4",
412+
},
378413
}
379414

380415
def test_names(self) -> None:

0 commit comments

Comments
 (0)