Skip to content

Commit 4484d2d

Browse files
Appply ruff/pycodestyle rule W293 to notebooks
W293 Blank line contains whitespace
1 parent cc82800 commit 4484d2d

File tree

3 files changed

+17
-22
lines changed

3 files changed

+17
-22
lines changed

notebooks/dask_copy.ipynb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
"\n",
185185
"def h5d_diagnostics(d):\n",
186186
" \"\"\"Print some diagnostics on an HDF5 dataset.\"\"\"\n",
187-
" \n",
187+
"\n",
188188
" print(d)\n",
189189
" nbytes = reduce(operator.mul, d.shape) * d.dtype.itemsize\n",
190190
" cbytes = d._id.get_storage_size()\n",
@@ -199,8 +199,7 @@
199199
" r += '; nbytes_stored: %s' % human_readable_size(cbytes)\n",
200200
" r += '; ratio: %.1f' % ratio\n",
201201
" r += '; chunks: %s' % str(d.chunks)\n",
202-
" print(r)\n",
203-
" "
202+
" print(r)\n"
204203
]
205204
},
206205
{
@@ -215,8 +214,7 @@
215214
" dsrc = da.from_array(src, chunks=chunks)\n",
216215
" with Profiler() as prof, ResourceProfiler(dt=dt) as rprof:\n",
217216
" da.store(dsrc, dst, num_workers=num_workers, lock=lock)\n",
218-
" visualize([prof, rprof], min_border_top=60, min_border_bottom=60)\n",
219-
" "
217+
" visualize([prof, rprof], min_border_top=60, min_border_bottom=60)\n"
220218
]
221219
},
222220
{

notebooks/genotype_benchmark_compressors.ipynb

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -352,29 +352,28 @@
352352
" c = list()\n",
353353
" d = list()\n",
354354
" for compression, compression_opts in compression_configs:\n",
355-
" \n",
355+
"\n",
356356
" def compress():\n",
357357
" zarr.array(genotype_sample, chunks=chunks, compression=compression,\n",
358358
" compression_opts=compression_opts)\n",
359-
" \n",
359+
"\n",
360360
" t = timeit.Timer(stmt=compress, globals=locals())\n",
361361
" compress_times = t.repeat(repeat=repeat, number=number)\n",
362362
" c.append(compress_times)\n",
363-
" \n",
363+
"\n",
364364
" z = zarr.array(genotype_sample, chunks=chunks, compression=compression,\n",
365365
" compression_opts=compression_opts)\n",
366-
" \n",
366+
"\n",
367367
" def decompress():\n",
368368
" z[:]\n",
369-
" \n",
369+
"\n",
370370
" t = timeit.Timer(stmt=decompress, globals=locals())\n",
371371
" decompress_times = t.repeat(repeat=repeat, number=number)\n",
372372
" d.append(decompress_times)\n",
373-
" \n",
373+
"\n",
374374
" log(compression, compression_opts, compress_times, decompress_times)\n",
375-
" \n",
376-
" return c, d\n",
377-
" "
375+
"\n",
376+
" return c, d\n"
378377
]
379378
},
380379
{

notebooks/store_benchmark.ipynb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@
112112
" shutil.rmtree(bench_dir)\n",
113113
" os.makedirs(bench_dir)\n",
114114
"\n",
115-
" \n",
115+
"\n",
116116
"def setup(a, name='foo/bar'):\n",
117117
" global fdict_z, hdict_z, lmdb_z, gdbm_z, ndbm_z, bdbm_btree_z, bdbm_hash_z, zip_z, dir_z\n",
118-
" \n",
118+
"\n",
119119
" clean()\n",
120120
" fdict_root = zarr.group(store=dict())\n",
121121
" hdict_root = zarr.group(store=zarr.DictStore())\n",
@@ -140,8 +140,7 @@
140140
" # check compression ratio\n",
141141
" fdict_z[:] = a\n",
142142
" return fdict_z.info\n",
143-
" \n",
144-
" "
143+
"\n"
145144
]
146145
},
147146
{
@@ -164,8 +163,8 @@
164163
" z[:] = a\n",
165164
" if hasattr(z.store, 'flush'):\n",
166165
" z.store.flush()\n",
167-
" \n",
168-
" \n",
166+
"\n",
167+
"\n",
169168
"def load(z, a):\n",
170169
" z.get_basic_selection(out=a)\n"
171170
]
@@ -933,8 +932,7 @@
933932
" result = (d // 2) * 2\n",
934933
" da.store(result, sink, lock=False)\n",
935934
" if hasattr(sink.store, 'flush'):\n",
936-
" sink.store.flush()\n",
937-
" "
935+
" sink.store.flush()\n"
938936
]
939937
},
940938
{

0 commit comments

Comments
 (0)