Skip to content

Commit ab2d8a8

Browse files
committed
fixed pep8 issues
1 parent c73a782 commit ab2d8a8

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

xarray/backends/zarr.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,11 @@ def get_chunk(name, var, chunks):
503503
if isinstance(spec, (tuple, list)) and chunk_spec[dim]:
504504
if any(s % chunk_spec[dim] for s in spec):
505505
warnings.warn("Specified Dask chunks %r would "
506-
"separate Zarr chunk shape %r for dimension %r. "
507-
"This significantly degrades performance. "
508-
"Consider rechunking after loading."
509-
% (chunks[dim], chunk_spec[dim], dim))
506+
"separate Zarr chunk shape %r for "
507+
"dimension %r. This significantly "
508+
"degrades performance. Consider "
509+
"rechunking after loading instead."
510+
% (chunks[dim], chunk_spec[dim], dim))
510511
chunk_spec[dim] = chunks[dim]
511512
return chunk_spec
512513

xarray/tests/test_backends.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,11 +1409,11 @@ def test_manual_chunk(self):
14091409

14101410
assert_identical(actual, auto)
14111411
assert_identical(actual.load(), auto.load())
1412-
1412+
14131413
def test_warning_on_bad_chunks(self):
14141414
original = create_test_data().chunk({'dim1': 4, 'dim2': 3, 'dim3': 5})
14151415

1416-
bad_chunks = (2, {'dim2':(3, 3, 2, 1)})
1416+
bad_chunks = (2, {'dim2': (3, 3, 2, 1)})
14171417
for chunks in bad_chunks:
14181418
kwargs = {'chunks': chunks}
14191419
with pytest.warns(UserWarning):
@@ -1432,8 +1432,6 @@ def test_warning_on_bad_chunks(self):
14321432
assert v._in_memory == (k in actual.dims)
14331433
assert len(record) == 0
14341434

1435-
1436-
14371435
def test_deprecate_auto_chunk(self):
14381436
original = create_test_data().chunk()
14391437
with pytest.warns(FutureWarning):
@@ -1454,7 +1452,6 @@ def test_deprecate_auto_chunk(self):
14541452
# there should be no chunks
14551453
assert v.chunks is None
14561454

1457-
14581455
def test_write_uneven_dask_chunks(self):
14591456
# regression for GH#2225
14601457
original = create_test_data().chunk({'dim1': 3, 'dim2': 4, 'dim3': 3})

0 commit comments

Comments
 (0)