summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
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
commit492cb372a29c793813305ecf60f32b59502f751a (patch)
tree07fd2c1784621732af51544c59aa162674ed98b6 /README.rst
parent22ee0e7e755b2ab2a8e40f4a9983b467b88c941d (diff)
downloadisort-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.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/README.rst b/README.rst
index f120339c..b58a3ac2 100644
--- a/README.rst
+++ b/README.rst
@@ -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.