Skip to content

Commit ca34638

Browse files
author
cmdupuis3
committed
Linter fixes
1 parent 1322eff commit ca34638

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

xbatcher/generators.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def _drop_input_dims(ds, input_dims, suffix='_input'):
5656
def _maybe_stack_batch_dims(ds, input_dims, squeeze_batch_dim, stacked_dim_name='sample'):
5757
batch_dims = [d for d in ds.dims if d not in input_dims]
5858
if len(batch_dims) < 2:
59-
if(squeeze_batch_dim):
59+
if squeeze_batch_dim:
6060
return ds
6161
else:
6262
return ds.expand_dims(stacked_dim_name, 0)
@@ -111,7 +111,7 @@ def __init__(
111111
batch_dims={},
112112
concat_input_dims=False,
113113
preload_batch=True,
114-
squeeze_batch_dim=True
114+
squeeze_batch_dim=True,
115115
):
116116

117117
self.ds = _as_xarray_dataset(ds)
@@ -140,7 +140,9 @@ def __iter__(self):
140140
new_input_dims = [
141141
dim + new_dim_suffix for dim in self.input_dims
142142
]
143-
yield _maybe_stack_batch_dims(dsc, new_input_dims, self.squeeze_batch_dim)
143+
yield _maybe_stack_batch_dims(
144+
dsc, new_input_dims, self.squeeze_batch_dim
145+
)
144146
else:
145147
for ds_input in input_generator:
146148
yield _maybe_stack_batch_dims(

0 commit comments

Comments
 (0)