Skip to content

Commit

Permalink
Use flake8-import-order for ordering imports
Browse files Browse the repository at this point in the history
It seems that isort is not compatible with black at the moment:
psf/black#127
PyCQA/isort#694

Both isort and black are working on a solution, but at the moment, we'll use
flake8-import-order instead
  • Loading branch information
kimt33 committed Jun 16, 2019
1 parent 338390c commit 9c88e2e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ repos:
- id: flake8
language_version: python3.6

- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.20
hooks:
- id: isort
language_version: python3.6
# - repo: https://github.com/pre-commit/mirrors-isort
# rev: v4.3.20
# hooks:
# - id: isort
# language_version: python3.6

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,20 @@ skip_install = true
deps =
flake8
flake8-docstrings
flake8-import-order>=0.9
pep8-naming
flake8-colors
pylint
black
isort
# isort
bandit
commands =
flake8 src/example-package/ tests/ setup.py
pylint src/example-package --rcfile=tox.ini --disable=similarities
black -l 100 --check ./
black -l 100 --diff ./
isort --check-only --recursive .
isort --diff --recursive .
# isort --check-only --recursive .
# isort --diff --recursive .
bandit -r src/example-package
ignore_errors = true

Expand Down

0 comments on commit 9c88e2e

Please sign in to comment.