diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 35a995d2..aa981f8d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,9 +37,17 @@ repos: - repo: https://github.com/nbQA-dev/nbQA rev: 1.0.0 hooks: - - id: nbqa-black - args: [--nbqa-mutate] - additional_dependencies: [black==21.7b0] + - id: nbqa-black + args: + - "--nbqa-mutate" + - "--target-version=py27" + - "--target-version=py35" + - "--target-version=py36" + - "--target-version=py37" + - "--target-version=py38" + - "--target-version=py39" + additional_dependencies: [black==21.7b0] + - id: nbqa-flake8 - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.9.0 diff --git a/examples/Basic usage - Functional.ipynb b/examples/Basic usage - Functional.ipynb index 114c5f32..9bb98cad 100644 --- a/examples/Basic usage - Functional.ipynb +++ b/examples/Basic usage - Functional.ipynb @@ -477,7 +477,7 @@ " # Labels and boiler plate\n", " plt.ylim([-0.05 * roi_max[i_roi], roi_max[i_roi] * 1.05])\n", " if i_roi == 0:\n", - " plt.ylabel(\"Trial {}\\n\\n $\\Delta f\\,/\\,f_0$\".format(i_trial + 1))\n", + " plt.ylabel(\"Trial {}\\n\\n\".format(i_trial + 1) + r\"$\\Delta f\\,/\\,f_0$\")\n", " if i_trial == 0:\n", " plt.title(\"ROI {}\".format(i_roi))\n", " plt.legend()\n", diff --git a/examples/Basic usage.ipynb b/examples/Basic usage.ipynb index 818341dc..3abb8040 100644 --- a/examples/Basic usage.ipynb +++ b/examples/Basic usage.ipynb @@ -565,7 +565,7 @@ "\n", "plt.title(\"ROI {}, Trial {}\".format(roi, trial), fontsize=15)\n", "plt.xlabel(\"Time (s)\", fontsize=15)\n", - "plt.ylabel(\"$\\Delta f\\,/\\,f_0$\", fontsize=15)\n", + "plt.ylabel(r\"$\\Delta f\\,/\\,f_0$\", fontsize=15)\n", "plt.grid()\n", "plt.legend()\n", "plt.show()" @@ -622,7 +622,7 @@ " # Labels and boiler plate\n", " plt.ylim([-0.05 * roi_max[i_roi], roi_max[i_roi] * 1.05])\n", " if i_roi == 0:\n", - " plt.ylabel(\"Trial {}\\n\\n $\\Delta f\\,/\\,f_0$\".format(i_trial + 1))\n", + " plt.ylabel(\"Trial {}\\n\\n\".format(i_trial + 1) + r\"$\\Delta f\\,/\\,f_0$\")\n", " if i_trial == 0:\n", " plt.title(\"ROI {}\".format(i_roi))\n", " plt.legend()\n", diff --git a/examples/SIMA example.ipynb b/examples/SIMA example.ipynb index 68f26abf..a806a4cb 100644 --- a/examples/SIMA example.ipynb +++ b/examples/SIMA example.ipynb @@ -76,7 +76,7 @@ "sequences = [sima.Sequence.create(\"TIFF\", tiff) for tiff in tiffs[:1]]\n", "try:\n", " dataset = sima.ImagingDataset(sequences, \"example.sima\")\n", - "except:\n", + "except BaseException:\n", " dataset = sima.ImagingDataset.load(\"example.sima\")" ] },