Skip to content

Commit d3a8ab4

Browse files
committed
lint fixes
1 parent c12490b commit d3a8ab4

File tree

4 files changed

+11
-109
lines changed

4 files changed

+11
-109
lines changed

docs/source/examples/Futures.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
],
187187
"source": [
188188
"f = rc[-1].apply(os.getpid)\n",
189-
"f.add_done_callback(lambda _: print(\"I got PID: %i\" % _.result()))\n",
189+
"f.add_done_callback(lambda _: print(f\"I got PID: {_.result()}\"))\n",
190190
"f.result()"
191191
]
192192
},
@@ -602,7 +602,7 @@
602602
"name": "python",
603603
"nbconvert_exporter": "python",
604604
"pygments_lexer": "ipython3",
605-
"version": "3.11.9"
605+
"version": "3.11.10"
606606
},
607607
"widgets": {
608608
"application/vnd.jupyter.widget-state+json": {

docs/source/examples/Monitoring an MPI Simulation - 1.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
"bcast = mpi.bcast\n",
128128
"barrier = mpi.barrier\n",
129129
"rank = mpi.rank\n",
130-
"print(\"MPI rank: %i/%i\" % (mpi.rank, mpi.size))"
130+
"print(f\"MPI rank: {mpi.rank}/{mpi.size}\")"
131131
]
132132
},
133133
{
@@ -300,7 +300,7 @@
300300
" nx, nyt, j, nsteps = view.pull(['nx', 'nyt', 'j', 'nsteps'], targets=0, block=True)\n",
301301
" fig, ax = plt.subplots()\n",
302302
" ax.contourf(Z)\n",
303-
" ax.set_title('Mesh: %i x %i, step %i/%i' % (nx, nyt, j + 1, nsteps))\n",
303+
" ax.set_title(f\"Mesh: {nx} x {nyt}, step {j + 1}/{nsteps}\")\n",
304304
" plt.axis('off')\n",
305305
" # We clear the notebook output before plotting this if in-place plot updating is requested\n",
306306
" if in_place:\n",
@@ -566,7 +566,7 @@
566566
"name": "python",
567567
"nbconvert_exporter": "python",
568568
"pygments_lexer": "ipython3",
569-
"version": "3.11.9"
569+
"version": "3.11.10"
570570
},
571571
"widgets": {
572572
"application/vnd.jupyter.widget-state+json": {

docs/source/examples/Monitoring an MPI Simulation - 2.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
"bcast = mpi.bcast\n",
120120
"barrier = mpi.barrier\n",
121121
"rank = mpi.rank\n",
122-
"print(\"MPI rank: %i/%i\" % (mpi.rank, mpi.size))"
122+
"print(f\"MPI rank: {mpi.rank}/{mpi.size}\")"
123123
]
124124
},
125125
{
@@ -270,7 +270,7 @@
270270
" else:\n",
271271
" fig, ax = plt.subplots()\n",
272272
" ax.contourf(Z)\n",
273-
" ax.set_title(\"Mesh: %i x %i, step %i/%i\" % (nx, nyt, j + 1, nsteps))\n",
273+
" ax.set_title(f\"Mesh: {nx} x {nyt}, step {j + 1}/{nsteps}\")\n",
274274
" plt.axis(\"off\")\n",
275275
" # We clear the notebook output before plotting this if in-place\n",
276276
" # plot updating is requested\n",
@@ -420,7 +420,7 @@
420420
"name": "python",
421421
"nbconvert_exporter": "python",
422422
"pygments_lexer": "ipython3",
423-
"version": "3.11.9"
423+
"version": "3.11.10"
424424
},
425425
"widgets": {
426426
"application/vnd.jupyter.widget-state+json": {

docs/source/examples/Using Dill.ipynb

+3-101
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"\n",
4545
" def has_closure(b):\n",
4646
" product = a * b\n",
47-
" f.write(\"%i: %g\\n\" % (os.getpid(), product))\n",
47+
" f.write(f\"{os.getpid()}: {product:g}\\n\")\n",
4848
" f.flush()\n",
4949
" return product\n",
5050
"\n",
@@ -596,109 +596,11 @@
596596
"name": "python",
597597
"nbconvert_exporter": "python",
598598
"pygments_lexer": "ipython3",
599-
"version": "3.11.9"
599+
"version": "3.11.10"
600600
},
601601
"widgets": {
602602
"application/vnd.jupyter.widget-state+json": {
603-
"state": {
604-
"1086f7640c6148b7bb5cd4202d114ba3": {
605-
"model_module": "@jupyter-widgets/controls",
606-
"model_module_version": "2.0.0",
607-
"model_name": "HTMLStyleModel",
608-
"state": {
609-
"description_width": "",
610-
"font_size": null,
611-
"text_color": null
612-
}
613-
},
614-
"37585be691034dba9d04f0c82d2d8a51": {
615-
"model_module": "@jupyter-widgets/base",
616-
"model_module_version": "2.0.0",
617-
"model_name": "LayoutModel",
618-
"state": {}
619-
},
620-
"610913dc61674fd5ac61f9f8fa714f47": {
621-
"model_module": "@jupyter-widgets/base",
622-
"model_module_version": "2.0.0",
623-
"model_name": "LayoutModel",
624-
"state": {}
625-
},
626-
"61aff84b5838480c92987db3608a698d": {
627-
"model_module": "@jupyter-widgets/controls",
628-
"model_module_version": "2.0.0",
629-
"model_name": "HTMLStyleModel",
630-
"state": {
631-
"description_width": "",
632-
"font_size": null,
633-
"text_color": null
634-
}
635-
},
636-
"86f27c1b3bf840c8b0b5c0323f0d6264": {
637-
"model_module": "@jupyter-widgets/controls",
638-
"model_module_version": "2.0.0",
639-
"model_name": "FloatProgressModel",
640-
"state": {
641-
"bar_style": "success",
642-
"layout": "IPY_MODEL_b2ded84395ea4d53891f184694793eff",
643-
"max": 2,
644-
"style": "IPY_MODEL_f458c2a21bc24550b2a0dd2b7f014046",
645-
"value": 2
646-
}
647-
},
648-
"8bdc6187bd964e89acfe57c818fccec6": {
649-
"model_module": "@jupyter-widgets/controls",
650-
"model_module_version": "2.0.0",
651-
"model_name": "HTMLModel",
652-
"state": {
653-
"layout": "IPY_MODEL_e2955a27d1a3468582d3cd1466737ba7",
654-
"style": "IPY_MODEL_61aff84b5838480c92987db3608a698d",
655-
"value": "100%"
656-
}
657-
},
658-
"a6d41c9031314b94851b72e499e8afbe": {
659-
"model_module": "@jupyter-widgets/controls",
660-
"model_module_version": "2.0.0",
661-
"model_name": "HTMLModel",
662-
"state": {
663-
"layout": "IPY_MODEL_37585be691034dba9d04f0c82d2d8a51",
664-
"style": "IPY_MODEL_1086f7640c6148b7bb5cd4202d114ba3",
665-
"value": " 2/2 [00:00<00:00,  1.18engine/s]"
666-
}
667-
},
668-
"b2ded84395ea4d53891f184694793eff": {
669-
"model_module": "@jupyter-widgets/base",
670-
"model_module_version": "2.0.0",
671-
"model_name": "LayoutModel",
672-
"state": {}
673-
},
674-
"d2ece3d105ca4c488a76246625ef8962": {
675-
"model_module": "@jupyter-widgets/controls",
676-
"model_module_version": "2.0.0",
677-
"model_name": "HBoxModel",
678-
"state": {
679-
"children": [
680-
"IPY_MODEL_8bdc6187bd964e89acfe57c818fccec6",
681-
"IPY_MODEL_86f27c1b3bf840c8b0b5c0323f0d6264",
682-
"IPY_MODEL_a6d41c9031314b94851b72e499e8afbe"
683-
],
684-
"layout": "IPY_MODEL_610913dc61674fd5ac61f9f8fa714f47"
685-
}
686-
},
687-
"e2955a27d1a3468582d3cd1466737ba7": {
688-
"model_module": "@jupyter-widgets/base",
689-
"model_module_version": "2.0.0",
690-
"model_name": "LayoutModel",
691-
"state": {}
692-
},
693-
"f458c2a21bc24550b2a0dd2b7f014046": {
694-
"model_module": "@jupyter-widgets/controls",
695-
"model_module_version": "2.0.0",
696-
"model_name": "ProgressStyleModel",
697-
"state": {
698-
"description_width": ""
699-
}
700-
}
701-
},
603+
"state": {},
702604
"version_major": 2,
703605
"version_minor": 0
704606
}

0 commit comments

Comments
 (0)