nbQA-dev / nbQA

Run ruff, isort, pyupgrade, mypy, pylint, flake8, and more on Jupyter Notebooks
https://nbqa.readthedocs.io/en/latest/index.html
MIT License
1.01k stars 38 forks source link

BUG blackdoc modifies but returns "left unchanged"? #162

Closed MarcoGorelli closed 3 years ago

MarcoGorelli commented 4 years ago
nbqa-blackdoc............................................................Failed
- hook id: nbqa
- files were modified by this hook

All done! ✨ 🍰 ✨
1 file left unchanged.
All done! ✨ 🍰 ✨
1 file left unchanged.

noticed with on commit 624027ec8858bf2051a58e7aeea1a43c2c8cec9d from git@github.com:MarcoGorelli/birdsong-recognition.git

MarcoGorelli commented 4 years ago

this is because when you save a notebook in vscode, it removes the endline at the end of the file

MarcoGorelli commented 4 years ago

actually, I should probably make sure that the endline is the same as what it was before

MarcoGorelli commented 3 years ago

Resolved - I'd rather be opinionated and always leave a trailing newline if --nbqa-mutate is passed