-
Notifications
You must be signed in to change notification settings - Fork 756
Description
Thanks for the excellent template. I've been working with notebooks for exploratory analysis. A couple things that could be improved with the current .pre-commit-config.yaml:
-
The current pre-commit is incompatible with black formatting with W503 and E203. This could be added to ignore or as suggested here: https://stackoverflow.com/questions/68161741/python-black-formatter-conflict-with-rule-flake8-w503-in-vscode
we could use--extend-ignoreinstead. -
The current
.pre-commit-config.yamlperforms code spell over files including Jupyter notebooks. This has some drawbacks as Jupyter notebooks are partially binary (i.e. can have embedded binary data) codespell can produce false positives in this area, and this is unlikely to be fixed upstream:
Jupyter notebook filter to only spell check inside cell inputs codespell-project/codespell#2138
For this I propose ignoring*.ipynbfiles for now. -
notebooks are not linted, which could be done with nbQA I suggest adding
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.4.0
hooks:
- id: nbqa-black
args: ["--line-length=99"]
- id: nbqa-isort
args: ["--profile=black"]
- id: nbqa-flake8
args: ["--extend-ignore=E402,E501,F401,F841", "--exclude=logs/*,data/*"]