Skip to content

Commit

Permalink
Merge pull request #261 from scottclowe/dev_nbqa
Browse files Browse the repository at this point in the history
JNB+DEV: Updates to nbqa for notebook pre-commit
  • Loading branch information
scottclowe authored Jul 26, 2021
2 parents f920357 + e4745bc commit 10a6cd9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
14 changes: 11 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/Basic usage - Functional.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions examples/Basic usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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()"
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion examples/SIMA example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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\")"
]
},
Expand Down

0 comments on commit 10a6cd9

Please sign in to comment.