Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Dec 3, 2024
1 parent c12490b commit d3a8ab4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 109 deletions.
4 changes: 2 additions & 2 deletions docs/source/examples/Futures.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
],
"source": [
"f = rc[-1].apply(os.getpid)\n",
"f.add_done_callback(lambda _: print(\"I got PID: %i\" % _.result()))\n",
"f.add_done_callback(lambda _: print(f\"I got PID: {_.result()}\"))\n",
"f.result()"
]
},
Expand Down Expand Up @@ -602,7 +602,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.10"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
6 changes: 3 additions & 3 deletions docs/source/examples/Monitoring an MPI Simulation - 1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"bcast = mpi.bcast\n",
"barrier = mpi.barrier\n",
"rank = mpi.rank\n",
"print(\"MPI rank: %i/%i\" % (mpi.rank, mpi.size))"
"print(f\"MPI rank: {mpi.rank}/{mpi.size}\")"
]
},
{
Expand Down Expand Up @@ -300,7 +300,7 @@
" nx, nyt, j, nsteps = view.pull(['nx', 'nyt', 'j', 'nsteps'], targets=0, block=True)\n",
" fig, ax = plt.subplots()\n",
" ax.contourf(Z)\n",
" ax.set_title('Mesh: %i x %i, step %i/%i' % (nx, nyt, j + 1, nsteps))\n",
" ax.set_title(f\"Mesh: {nx} x {nyt}, step {j + 1}/{nsteps}\")\n",
" plt.axis('off')\n",
" # We clear the notebook output before plotting this if in-place plot updating is requested\n",
" if in_place:\n",
Expand Down Expand Up @@ -566,7 +566,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.10"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
6 changes: 3 additions & 3 deletions docs/source/examples/Monitoring an MPI Simulation - 2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"bcast = mpi.bcast\n",
"barrier = mpi.barrier\n",
"rank = mpi.rank\n",
"print(\"MPI rank: %i/%i\" % (mpi.rank, mpi.size))"
"print(f\"MPI rank: {mpi.rank}/{mpi.size}\")"
]
},
{
Expand Down Expand Up @@ -270,7 +270,7 @@
" else:\n",
" fig, ax = plt.subplots()\n",
" ax.contourf(Z)\n",
" ax.set_title(\"Mesh: %i x %i, step %i/%i\" % (nx, nyt, j + 1, nsteps))\n",
" ax.set_title(f\"Mesh: {nx} x {nyt}, step {j + 1}/{nsteps}\")\n",
" plt.axis(\"off\")\n",
" # We clear the notebook output before plotting this if in-place\n",
" # plot updating is requested\n",
Expand Down Expand Up @@ -420,7 +420,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.10"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
104 changes: 3 additions & 101 deletions docs/source/examples/Using Dill.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"\n",
" def has_closure(b):\n",
" product = a * b\n",
" f.write(\"%i: %g\\n\" % (os.getpid(), product))\n",
" f.write(f\"{os.getpid()}: {product:g}\\n\")\n",
" f.flush()\n",
" return product\n",
"\n",
Expand Down Expand Up @@ -596,109 +596,11 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.10"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {
"1086f7640c6148b7bb5cd4202d114ba3": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HTMLStyleModel",
"state": {
"description_width": "",
"font_size": null,
"text_color": null
}
},
"37585be691034dba9d04f0c82d2d8a51": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"610913dc61674fd5ac61f9f8fa714f47": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"61aff84b5838480c92987db3608a698d": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HTMLStyleModel",
"state": {
"description_width": "",
"font_size": null,
"text_color": null
}
},
"86f27c1b3bf840c8b0b5c0323f0d6264": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "FloatProgressModel",
"state": {
"bar_style": "success",
"layout": "IPY_MODEL_b2ded84395ea4d53891f184694793eff",
"max": 2,
"style": "IPY_MODEL_f458c2a21bc24550b2a0dd2b7f014046",
"value": 2
}
},
"8bdc6187bd964e89acfe57c818fccec6": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HTMLModel",
"state": {
"layout": "IPY_MODEL_e2955a27d1a3468582d3cd1466737ba7",
"style": "IPY_MODEL_61aff84b5838480c92987db3608a698d",
"value": "100%"
}
},
"a6d41c9031314b94851b72e499e8afbe": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HTMLModel",
"state": {
"layout": "IPY_MODEL_37585be691034dba9d04f0c82d2d8a51",
"style": "IPY_MODEL_1086f7640c6148b7bb5cd4202d114ba3",
"value": " 2/2 [00:00<00:00,  1.18engine/s]"
}
},
"b2ded84395ea4d53891f184694793eff": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"d2ece3d105ca4c488a76246625ef8962": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "HBoxModel",
"state": {
"children": [
"IPY_MODEL_8bdc6187bd964e89acfe57c818fccec6",
"IPY_MODEL_86f27c1b3bf840c8b0b5c0323f0d6264",
"IPY_MODEL_a6d41c9031314b94851b72e499e8afbe"
],
"layout": "IPY_MODEL_610913dc61674fd5ac61f9f8fa714f47"
}
},
"e2955a27d1a3468582d3cd1466737ba7": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "2.0.0",
"model_name": "LayoutModel",
"state": {}
},
"f458c2a21bc24550b2a0dd2b7f014046": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "2.0.0",
"model_name": "ProgressStyleModel",
"state": {
"description_width": ""
}
}
},
"state": {},
"version_major": 2,
"version_minor": 0
}
Expand Down

0 comments on commit d3a8ab4

Please sign in to comment.