Skip to content

Commit bb0b100

Browse files
committed
Use isort to sort imports
1 parent 7e8ad2c commit bb0b100

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,11 @@ repos:
4242
- id: blacken-docs
4343
additional_dependencies:
4444
- black==23.1.0
45-
- repo: https://github.com/asottile/reorder-python-imports
46-
rev: v3.12.0
45+
- repo: https://github.com/pycqa/isort
46+
rev: 5.13.2
4747
hooks:
48-
- id: reorder-python-imports
49-
args:
50-
- --py38-plus
51-
- --application-directories
52-
- .:example:src
53-
- --add-import
54-
- 'from __future__ import annotations'
48+
- id: isort
49+
name: isort (python)
5550
- repo: https://github.com/PyCQA/flake8
5651
rev: 7.0.0
5752
hooks:

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ randomly = "pytest_randomly"
4747
[tool.black]
4848
target-version = ['py38']
4949

50+
[tool.isort]
51+
add_imports = [
52+
"from __future__ import annotations"
53+
]
54+
force_single_line = true
55+
profile = "black"
56+
5057
[tool.pytest.ini_options]
5158
addopts = """\
5259
--strict-config

0 commit comments

Comments
 (0)