Skip to content

Commit 7e100b5

Browse files
author
Lily Wang
committed
fixed pep8 issues
1 parent 228cc88 commit 7e100b5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

xarray/backends/zarr.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def sync(self):
332332
def open_zarr(store, group=None, synchronizer=None, chunks='auto',
333333
decode_cf=True, mask_and_scale=True, decode_times=True,
334334
concat_characters=True, decode_coords=True,
335-
drop_variables=None, overwrite_encoded_chunks=False,
335+
drop_variables=None, overwrite_encoded_chunks=False,
336336
**kwargs):
337337
"""Load and decode a dataset from a Zarr store.
338338
@@ -403,9 +403,9 @@ def open_zarr(store, group=None, synchronizer=None, chunks='auto',
403403
"""
404404
if 'auto_chunk' in kwargs:
405405
auto_chunk = kwargs.pop('auto_chunk')
406-
if auto_chunk == True:
406+
if auto_chunk:
407407
chunks = 'auto' # maintain backwards compatibility
408-
elif auto_chunk == False:
408+
else:
409409
chunks = None
410410

411411
warnings.warn("auto_chunk is deprecated. Use chunks='auto' instead.",

xarray/tests/test_backends.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,27 +1380,27 @@ def test_manual_chunk(self):
13801380

13811381
assert_identical(actual, auto)
13821382
assert_identical(actual.load(), auto.load())
1383-
1383+
13841384
def test_deprecate_auto_chunk(self):
13851385
original = create_test_data().chunk()
13861386
with pytest.warns(FutureWarning):
13871387
with self.roundtrip(
1388-
original, open_kwargs={'auto_chunk': True}) as actual:
1388+
original, open_kwargs={'auto_chunk': True}) as actual:
13891389
for k, v in actual.variables.items():
13901390
# only index variables should be in memory
13911391
assert v._in_memory == (k in actual.dims)
13921392
# chunk size should be the same as original
13931393
assert v.chunks == original[k].chunks
1394-
1394+
13951395
with pytest.warns(FutureWarning):
13961396
with self.roundtrip(
1397-
original, open_kwargs={'auto_chunk': False}) as actual:
1397+
original, open_kwargs={'auto_chunk': False}) as actual:
13981398
for k, v in actual.variables.items():
13991399
# only index variables should be in memory
14001400
assert v._in_memory == (k in actual.dims)
14011401
# there should be no chunks
14021402
assert v.chunks is None
1403-
1403+
14041404

14051405
def test_write_uneven_dask_chunks(self):
14061406
# regression for GH#2225

0 commit comments

Comments
 (0)