November 10, 2021

How to Properly Configure Isort and Black

When you both use black and isort, which you probably should, you will notice that they both touch the import statements. When you now use both tools e.g. via pre-commit, it could happen that both tools play ping-pong with each other, as both tools modify the source code, and then report a failure. This is especially “funny”, when both tools report modified source and a failure, but basically at the end you have a git repository with no modifications, as the one tools fixes the other’s changes....