diff options
author | Éric Araujo <merwok@netwok.org> | 2016-02-02 16:52:44 -0500 |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2016-02-02 16:52:44 -0500 |
commit | 492cb372a29c793813305ecf60f32b59502f751a (patch) | |
tree | 07fd2c1784621732af51544c59aa162674ed98b6 /README.rst | |
parent | 22ee0e7e755b2ab2a8e40f4a9983b467b88c941d (diff) | |
download | isort-492cb372a29c793813305ecf60f32b59502f751a.tar.gz |
Add missing shebang and import to git hook
Also remove unneeded __main__ check.
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -548,10 +548,11 @@ To cause the commit to fail if there are isort errors (strict mode), include the .. code-block:: python + #!/usr/bin/env python + import sys from isort.hooks import git_hook - if __name__ == '__main__': - sys.exit(git_hook(strict=True)) + sys.exit(git_hook(strict=True)) If you just want to display warnings, but allow the commit to happen anyway, call ``git_hook`` without the `strict` parameter. |