autoflake
autoflake copied to clipboard
Option to also print diffs when using `--in-place`
I'm running autoflake as a hook with pre-commit:
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--ignore-init-module-imports']
When autoflake makes some changes, all it says is that it made some changes:
autoflake................................................................Failed
- hook id: autoflake
- files were modified by this hook
but doesn't say what or where, I have to look at my unstaged files to see what happened. Since it usually doesn't make too many changes, it would be helpful if there was a flag that would print the diff and make the changes.
@verhovsky pre-commit run --show-diff-on-failure