Skip to content

Commit 0556e53

Browse files
author
Hugo Osvaldo Barrera
committed
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.
1 parent 98fcd12 commit 0556e53

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ repos:
1717
rev: "21.6b0"
1818
hooks:
1919
- id: black
20-
- repo: https://github.com/asottile/reorder_python_imports
21-
rev: v2.5.0
20+
- repo: https://github.com/pycqa/isort
21+
rev: 5.8.0
2222
hooks:
23-
- id: reorder-python-imports
23+
- id: isort
24+
name: isort (python)

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ extend-ignore =
2121
max-line-length = 88
2222
exclude = .eggs,build
2323
import-order-style = smarkets
24+
25+
[isort]
26+
force_single_line=true

0 commit comments

Comments
 (0)