Skip to content

Commit 0d2dd18

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5ce75d4 commit 0d2dd18

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

xarray/tests/test_concat.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ def test_concat_str_dtype(self, dtype, dim) -> None:
576576
def test_concat_fill_missing_variables(self, dim, coord):
577577
# create var names list with one missing value
578578
def get_var_names(var_cnt=10, list_cnt=10):
579-
orig = [f'd{i:02d}' for i in range(var_cnt)]
579+
orig = [f"d{i:02d}" for i in range(var_cnt)]
580580
var_names = []
581581
for i in range(0, list_cnt):
582582
l1 = orig.copy()
@@ -603,15 +603,19 @@ def create_ds(var_names, dim=False, coord=False, drop_idx=False):
603603
dsi = dsi.isel(time=0)
604604
out_ds.append(dsi)
605605
return out_ds
606+
606607
var_names = get_var_names()
607608

608609
import random
610+
609611
random.seed(42)
610612
drop_idx = [random.randrange(len(vlist)) for vlist in var_names]
611-
expected = concat(create_ds(var_names, dim=dim, coord=coord), dim="time", data_vars="all")
613+
expected = concat(
614+
create_ds(var_names, dim=dim, coord=coord), dim="time", data_vars="all"
615+
)
612616
for i, idx in enumerate(drop_idx):
613617
if dim:
614-
expected[var_names[0][idx]][i * 2: i * 2 + 2] = np.nan
618+
expected[var_names[0][idx]][i * 2 : i * 2 + 2] = np.nan
615619
else:
616620
expected[var_names[0][idx]][i] = np.nan
617621

0 commit comments

Comments
 (0)