diff --git a/.gitignore b/.gitignore index 3ba8bb9..3805118 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .coverage *.egg-info +.idea diff --git a/hooks.yaml b/hooks.yaml deleted file mode 100644 index 1d0b62b..0000000 --- a/hooks.yaml +++ /dev/null @@ -1,6 +0,0 @@ -- id: python-import-sorter - name: Sort python imports - description: This hook sorts python imports. - entry: python-import-sorter - language: python - files: \.py$ diff --git a/pre_commit_hook/sort.py b/pre_commit_hook/sort.py index dd972a4..110a856 100644 --- a/pre_commit_hook/sort.py +++ b/pre_commit_hook/sort.py @@ -1,7 +1,7 @@ from __future__ import print_function import argparse -import os +import os, sys from isort import isort @@ -34,4 +34,4 @@ def main(argv=None): return return_value if __name__ == '__main__': - exit(main()) + exit(main(sys.argv[1:]))