diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 234a4c8..192e375 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/pyproject.toml b/pyproject.toml index d7733f5..4dc3087 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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