FalconSocial / pre-commit-python-sorter

A pre-commit hook to sort your Python imports.
MIT License
27 stars 30 forks source link
:exclamation: This project is no longer maintained, and should be replaced with a different project such as isort.

Build Status Coverage Status

Pre-commit python module sorter

This is a pre-commit hook that will sort your imports for you (or show you how it should be done).

Add this to your .pre-commit-config.yaml file

- repo: git://github.com/FalconSocial/pre-commit-python-sorter
  sha: 1.0.4
  hooks:
  - id: python-import-sorter
    args: ['--silent-overwrite']

Available flags:

The hook supports isort's configuration files - Please refer to the isort documentation for reference

Development: pip install -r requirements-dev.txt

Testing: py.test --cov pre_commit_hook tests/