Skip to content

Commit

Permalink
Correct python format (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
drinckes authored Dec 20, 2024
1 parent 4d7969e commit adc3149
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions python/openlocationcode_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ def setUp(self):
# all values should be booleans except the code
for i in range(1, len(headermap)):
td[i] = (td[i] == 'true')
self.testdata.append(
{headermap[i]: v for i, v in enumerate(td)})
self.testdata.append({
headermap[i]: v for i, v in enumerate(td)
})

def test_validcodes(self):
for td in self.testdata:
Expand Down Expand Up @@ -64,8 +65,9 @@ def setUp(self):
headermap), 'Wrong format of testing data: {0}'.format(line)
td[1] = float(td[1])
td[2] = float(td[2])
self.testdata.append(
{headermap[i]: v for i, v in enumerate(td)})
self.testdata.append({
headermap[i]: v for i, v in enumerate(td)
})

def test_full2short(self):
for td in self.testdata:
Expand Down Expand Up @@ -96,8 +98,9 @@ def setUp(self):
# first 3 keys should be numbers
for i in range(0, 3):
td[i] = float(td[i])
self.testdata.append(
{headermap[i]: v for i, v in enumerate(td)})
self.testdata.append({
headermap[i]: v for i, v in enumerate(td)
})

def test_encoding(self):
for td in self.testdata:
Expand Down Expand Up @@ -131,8 +134,9 @@ def setUp(self):
# all values should be numbers except the code
for i in range(1, len(headermap)):
td[i] = float(td[i])
self.testdata.append(
{headermap[i]: v for i, v in enumerate(td)})
self.testdata.append({
headermap[i]: v for i, v in enumerate(td)
})

def test_decoding(self):
precision = 10
Expand Down

0 comments on commit adc3149

Please sign in to comment.