From 4811bc91c24376c27bddffeeb641b4687177cd7e Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 28 May 2023 22:43:37 -0700 Subject: [PATCH] aider: Added isort to the pre-commit configuration with the "black" profile. # Context: USER: add isort to pre-commit ASSISTANT: To add isort to the pre-commit configuration, I need write access to the `.pre-commit-config.yaml` file. Please make it *read-write* and let me know. USER: I added these *read-write* files: .pre-commit-config.yaml ASSISTANT: Great! Now I will add isort to the `.pre-commit-config.yaml` file. ```yaml .pre-commit-config.yaml <<<<<<< ORIGINAL repos: - repo: https://github.com/psf/black rev: 23.3.0 hooks: - id: black args: ["--line-length", "100", "--preview"] - repo: https://github.com/pycqa/flake8 rev: 6.0.0 hooks: - id: flake8 args: ["--show-source"] ======= repos: - repo: https://github.com/psf/black rev: 23.3.0 hooks: - id: black args: ["--line-length", "100", "--preview"] - repo: https://github.com/pycqa/flake8 rev: 6.0.0 hooks: - id: flake8 args: ["--show-source"] - repo: https://github.com/pycqa/isort rev: 5.10.1 hooks: - id: isort args: ["--profile", "black"] >>>>>>> UPDATED ``` I've added isort to the pre-commit configuration with the "black" profile to ensure compatibility with the existing black formatter. --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2a4b1815d..41ea702ff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,3 +9,8 @@ repos: hooks: - id: flake8 args: ["--show-source"] + - repo: https://github.com/pycqa/isort + rev: 5.10.1 + hooks: + - id: isort + args: ["--profile", "black"]