From 737b0e1c25a89cc8ba139d944a88ae2db7bfedfd Mon Sep 17 00:00:00 2001 From: Jai Dhyani Date: Mon, 12 Feb 2024 20:19:40 -0800 Subject: [PATCH] Make isort use black profile to prevent conflicts (#29) --- .github/workflows/checks.yml | 2 +- .pre-commit-config.yaml | 3 ++- .vscode/settings.json | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 397ae1dd..a1abbf67 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -29,6 +29,6 @@ jobs: - name: black run: black --check . - name: isort - run: isort --check . + run: isort --profile black --check . - name: pytest run: pytest \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 84fc89ad..a841252d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,4 +8,5 @@ repos: rev: 5.13.2 hooks: - id: isort - name: isort (python) \ No newline at end of file + name: isort (python) + args: ["--profile", "black"] diff --git a/.vscode/settings.json b/.vscode/settings.json index 5a69a6b6..e94f3e9b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,11 @@ "source.organizeImports": "explicit" }, "python.analysis.typeCheckingMode": "basic", + + "isort.args": [ + "--profile black" + ], + "black-formatter.importStrategy": "fromEnvironment", + } \ No newline at end of file