From cceb31044527de6a1bdc03545c66881406557b7e Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 30 Jan 2024 08:08:23 -0300 Subject: [PATCH] Replace reorder-python-imports by isort Unfortunately `black` and `reorder-python-imports` are no longer compatible between each other, and will not be in the foreseeable feature: https://github.com/asottile/reorder-python-imports/issues/367 https://github.com/asottile/reorder-python-imports/issues/366 https://github.com/psf/black/issues/4175 Drop `reorder-python-imports` in favor of `isort`. --- .pre-commit-config.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 78681bf..161f13d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,11 +16,12 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - id: debug-statements -- 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: ['--application-directories=.:src', --py36-plus] + - id: isort + name: isort + args: ["--force-single-line", "--line-length=100", "--profile=black"] - repo: local hooks: - id: rst