Closed ncgoodbody closed 2 years ago
Hey @ncgoodbody
Thanks for your kind words, and for your report!
Sounds like this might be a bug - could you please upload your notebook (or a smaller version of the notebook that reproduces the issue) so I can debug?
This is a great example of rubber duck coding. As I was preparing a notebook for you, I realized that I was running nbqa-black
right after nbqa-isort
, and they were conflicting. So I set --profile=black
, and the problem is solved.
Thanks for your willingness to look at my notebook and, again, for this tool. Keep it up!
Ah nice, thanks for letting me know and closing the issue!
Hello! First off, I love this tool. I'm leading a team of curriculum developers, and we use
nbqa-isort
andnbqa-black
to keep all our code consistent. It's a lifesaver, so thank you for putting it out into the world.I'm having an issue with
nbqa-isort
where I can't pass the pre-commit hook even when changes have been made to the file.For example, I'll have a cell of imports at the top of
foo.ipynb
I'll commit my code and get this message:
The imports will be fixed:
But then when I try to commit the corrected file, I get the same fail message
So I end up stuck in a loop where the file is fixed, but I still can't commit it.
Is there something I'm missing? Something in the cell that's throwing off
nbqa-isort
? Would love some guidance.Here's what my
.pre-commit-config.yaml
looks like:I'm running MacOS (Big Sur v. 11.6.4 (20G417))