diff options
author | Tamas Szabo <szabtam@gmail.com> | 2020-07-25 15:47:04 +0300 |
---|---|---|
committer | Tamas Szabo <szabtam@gmail.com> | 2020-07-25 16:06:13 +0300 |
commit | 045c0842901d7a1ad49ad18169f075aeffbbe74b (patch) | |
tree | 9dcb11870bf6600a8ea9db769b3f64a43631126a /README.md | |
parent | 2d76984f1345763f31aff8c1fc940000700cd46e (diff) | |
download | isort-045c0842901d7a1ad49ad18169f075aeffbbe74b.tar.gz |
Adds lazy option to git hook.
Fixes #1214
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -526,13 +526,18 @@ include the following in `.git/hooks/pre-commit`: import sys from isort.hooks import git_hook -sys.exit(git_hook(strict=True, modify=True)) +sys.exit(git_hook(strict=True, modify=True, lazy=True)) ``` If you just want to display warnings, but allow the commit to happen anyway, call `git_hook` without the strict parameter. If you want to display warnings, but not also fix the code, call `git_hook` without the modify parameter. +The `lazy` argument is to support users who are "lazy" to add files +individually to the index and tend to use `git commit -a` instead. +Set it to `True` to ensure all tracked files are properly isorted, +leave it out or set it to `False` to check only files added to your +index. Setuptools integration ---------------------- |