Use isort to reorder python imports

reorder-python-imports is hard to set up correctly.

isort is a lot simpler to set to set up it locally, and is kinda
becoming the standard in the python world.

The import style remains the same, and is tweaked to minimise conflicts.
This commit is contained in:
Hugo Osvaldo Barrera 2021-07-25 18:32:48 +02:00
parent 98fcd12fa7
commit 0556e53e0c
2 changed files with 7 additions and 3 deletions

View file

@ -17,7 +17,8 @@ repos:
rev: "21.6b0"
hooks:
- id: black
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.5.0
- repo: https://github.com/pycqa/isort
rev: 5.8.0
hooks:
- id: reorder-python-imports
- id: isort
name: isort (python)

View file

@ -21,3 +21,6 @@ extend-ignore =
max-line-length = 88
exclude = .eggs,build
import-order-style = smarkets
[isort]
force_single_line=true