If you specify `--remove-all-unused-imports` in the `args` section of `.pre-commit.yaml` then the hook always passes, even when you have unused imports. ## Case study `.pre-commit.yaml` ```yaml repos: - repo: https://github.com/PyCQA/autoflake rev: v2.2.1 hooks: - id: autoflake args: [--remove-all-unused-imports] ``` `foo.py` ```python import random print("Does nothing") ``` Try commiting `foo.py` and the hook will pass! If I remove the arg then the hook works as expected. It works as expected when running from the command line: ```bash $ autoflake --remove-all-unused-imports foo.py --- original/foo.py +++ fixed/foo.py @@ -1,3 +1,2 @@ -import random print("Does nothing") ```