From f02597aa4fe2913513fc252b2a133a8e6ec77111 Mon Sep 17 00:00:00 2001 From: Alex Pyrgiotis Date: Fri, 13 Oct 2023 17:27:54 +0300 Subject: [PATCH] Make isort use .gitignore properly By using `--skip / --extend-skip .gitignore`, we actually never read the .gitignore file. We have to use `--skip-gitignore` instead. This requires Git in the development environment, so we need to install Git in our CI runners as well. --- .circleci/config.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c147334..b4d8d1a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,7 +85,7 @@ jobs: # https://github.com/freedomofpress/dangerzone/issues/292#issuecomment-1351368122 command: | apt-get update - apt-get install -y make python3 python3-poetry --no-install-recommends + apt-get install -y git make python3 python3-poetry --no-install-recommends poetry install --no-ansi --only lint - run: name: Run linters to enforce code style diff --git a/pyproject.toml b/pyproject.toml index df8553f..48e2382 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ strip-ansi = "*" [tool.isort] profile = "black" -extend_skip = [".gitignore"] +skip_gitignore = true # This is necessary due to https://github.com/PyCQA/isort/issues/1835 follow_links = false