Skip to content

Commit 7491c0e

Browse files
pylint
1 parent a9a2555 commit 7491c0e

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

climada/entity/exposures/test/test_litpop.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,28 @@
3232
def data_arrays_demo(number_of_arrays=2):
3333
"""init demo data arrays (2d) for LitPop core calculations"""
3434
data_arrays = list()
35+
# fmt: off
3536
if number_of_arrays > 0:
36-
data_arrays.append(np.array([[0, 1, 2], [3, 4, 5]]))
37-
# array([[0, 1, 2],
38-
# [3, 4, 5]])
37+
data_arrays.append(np.array([
38+
[0, 1, 2],
39+
[3, 4, 5]
40+
]))
3941
if number_of_arrays > 1:
40-
data_arrays.append(np.array([[10, 10, 10], [1, 1, 1]]))
41-
# array([[10, 10, 10],
42-
# [1, 1, 1]])
42+
data_arrays.append(np.array([
43+
[10, 10, 10],
44+
[ 1, 1, 1]
45+
]))
4346
if number_of_arrays > 2:
44-
data_arrays.append(np.array([[0, 1, 10], [0, 1, 10]]))
45-
# array([[0, 1, 10],
46-
# [0, 1, 10]])
47+
data_arrays.append(np.array([
48+
[0, 1, 10],
49+
[0, 1, 10]
50+
]))
4751
if number_of_arrays > 3:
48-
data_arrays.append([[0, 1, 10, 100], [0, 1, 10, 100]])
49-
# [[0, 1, 10, 100],
50-
# [0, 1, 10, 100]]
52+
data_arrays.append([
53+
[0, 1, 10, 100],
54+
[0, 1, 10, 100]
55+
])
56+
# fmt: on
5157
return data_arrays
5258

5359

climada/test/test_litpop_integr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def test_get_gpw_file_path_pass(self):
396396
self.assertIn("gpw_v4_population", str(path))
397397
except FileExistsError as err:
398398
self.assertIn("lease download", err.args[0])
399-
# pylint: disabled=consider-using-f-string
399+
# pylint: disable=consider-using-f-string
400400
self.skipTest("GPW input data for GPW v4.%i not found." % (gpw_version))
401401

402402
def test_load_gpw_pop_shape_pass(self):
@@ -416,7 +416,7 @@ def test_load_gpw_pop_shape_pass(self):
416416
self.assertEqual(len(data.shape), 2)
417417
except FileExistsError as err:
418418
self.assertIn("lease download", err.args[0])
419-
# pylint: disabled=consider-using-f-string
419+
# pylint: disable=consider-using-f-string
420420
self.skipTest("GPW input data for GPW v4.%i not found." % (gpw_version))
421421

422422

0 commit comments

Comments
 (0)