Skip to content

Commit 43606ce

Browse files
Apply ruff/pyupgrade rule UP032 to notebooks
UP032 Use f-string instead of `format` call
1 parent bd2d489 commit 43606ce

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

notebooks/dask_copy.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,13 @@
198198
" ratio = nbytes / cbytes\n",
199199
" else:\n",
200200
" ratio = np.inf\n",
201-
" r = ' compression: {}'.format(d.compression)\n",
202-
" r += '; compression_opts: {}'.format(d.compression_opts)\n",
203-
" r += '; shuffle: {}'.format(d.shuffle)\n",
204-
" r += '\\n nbytes: {}'.format(human_readable_size(nbytes))\n",
205-
" r += '; nbytes_stored: {}'.format(human_readable_size(cbytes))\n",
206-
" r += '; ratio: {:.1f}'.format(ratio)\n",
207-
" r += '; chunks: {}'.format(str(d.chunks))\n",
201+
" r = f' compression: {d.compression}'\n",
202+
" r += f'; compression_opts: {d.compression_opts}'\n",
203+
" r += f'; shuffle: {d.shuffle}'\n",
204+
" r += f'\\n nbytes: {human_readable_size(nbytes)}'\n",
205+
" r += f'; nbytes_stored: {human_readable_size(cbytes)}'\n",
206+
" r += f'; ratio: {ratio:.1f}'\n",
207+
" r += f'; chunks: {str(d.chunks)}'\n",
208208
" print(r)\n"
209209
]
210210
},

notebooks/genotype_benchmark_compressors.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
],
318318
"source": [
319319
"ratios = compression_ratios()\n",
320-
"labels = ['{} - {}'.format(c, o)\n",
320+
"labels = [f'{c} - {o}'\n",
321321
" for c, o in compression_configs]\n",
322322
"\n",
323323
"fig = plt.figure(figsize=(12, len(compression_configs)*.3))\n",

0 commit comments

Comments
 (0)