Skip to content

Commit 74a4f4d

Browse files
committed
Fix linting
1 parent 902294f commit 74a4f4d

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

climada/entity/exposures/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ def from_raster(
707707
width=None,
708708
height=None,
709709
resampling=Resampling.nearest,
710-
attrs=None
710+
attrs=None,
711711
):
712712
"""Read raster data and set latitude, longitude, value and meta
713713
@@ -736,7 +736,7 @@ def from_raster(
736736
resampling
737737
function used for reprojection to dst_crs
738738
attrs : dict
739-
dictionary giving kwargs passed to the Exposures class. Keys must
739+
dictionary giving kwargs passed to the Exposures class. Keys must
740740
be in the Exposures._metadata list, i.e. "description", "ref_year",
741741
"value_unit"
742742
@@ -774,7 +774,7 @@ def from_raster(
774774
},
775775
meta=meta,
776776
crs=meta["crs"],
777-
**attrs
777+
**attrs,
778778
)
779779

780780
def plot_scatter(

climada/entity/exposures/test/test_base.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,8 @@ def test__init__mda_in_kwargs(self):
129129
def test_read_raster_pass(self):
130130
"""from_raster"""
131131
exp = Exposures.from_raster(
132-
HAZ_DEMO_FL,
133-
window=Window(10, 20, 50, 60),
134-
attrs={'value_unit': 'USD'})
132+
HAZ_DEMO_FL, window=Window(10, 20, 50, 60), attrs={'value_unit': 'USD'}
133+
)
135134
exp.check()
136135
self.assertTrue(u_coord.equal_crs(exp.crs, DEF_CRS))
137136
self.assertAlmostEqual(
@@ -152,7 +151,7 @@ def test_read_raster_pass(self):
152151
self.assertAlmostEqual(
153152
exp.gdf["value"].values.reshape((60, 50))[25, 12], 0.056825936
154153
)
155-
self.assertEqual(exp.value_unit, 'USD')
154+
self.assertEqual(exp.value_unit, "USD")
156155

157156
def test_assign_raster_pass(self):
158157
"""Test assign_centroids with raster hazard"""

0 commit comments

Comments
 (0)