Skip to content

Commit

Permalink
Use isort to sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz committed Feb 11, 2024
1 parent 7e8ad2c commit bb0b100
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .pre-commit-config.yaml
Expand Up @@ -42,16 +42,11 @@ repos:
- id: blacken-docs
additional_dependencies:
- black==23.1.0
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: reorder-python-imports
args:
- --py38-plus
- --application-directories
- .:example:src
- --add-import
- 'from __future__ import annotations'
- id: isort
name: isort (python)
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Expand Up @@ -47,6 +47,13 @@ randomly = "pytest_randomly"
[tool.black]
target-version = ['py38']

[tool.isort]
add_imports = [
"from __future__ import annotations"
]
force_single_line = true
profile = "black"

[tool.pytest.ini_options]
addopts = """\
--strict-config
Expand Down

0 comments on commit bb0b100

Please sign in to comment.