Passing lazy=True to git_hook causes isort to discover unstaged files, but then AFAICS it still only checks the staged file content.
This fits with my observed behaviour that running the following in my pre-commit hook:
python -c "import sys; from isort.hooks import git_hook; sys.exit(git_hook(strict=True, modify=True, lazy=True))"
does not flag (or fix) isort errors in files that are modified but not staged.
AFAICS this has been broken since it was added but perhaps I've missed something?
Passing
lazy=Truetogit_hookcauses isort to discover unstaged files, but then AFAICS it still only checks the staged file content.This fits with my observed behaviour that running the following in my
pre-commithook:does not flag (or fix) isort errors in files that are modified but not staged.
AFAICS this has been broken since it was added but perhaps I've missed something?