Skip to content

Commit 67d854a

Browse files
Apply ruff/pyupgrde rule UP031 to notebooks
UP031 Use format specifiers instead of percent format
1 parent 9f6bb1d commit 67d854a

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: %s' % d.compression\n",
202-
" r += '; compression_opts: %s' % d.compression_opts\n",
203-
" r += '; shuffle: %s' % d.shuffle\n",
204-
" r += '\\n nbytes: %s' % human_readable_size(nbytes)\n",
205-
" r += '; nbytes_stored: %s' % human_readable_size(cbytes)\n",
206-
" r += '; ratio: %.1f' % ratio\n",
207-
" r += '; chunks: %s' % str(d.chunks)\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",
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 = ['%s - %s' % (c, o)\n",
320+
"labels = ['{} - {}'.format(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)