From 9ed0c85fe1e593e689acff44328180a3baebbc70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 9 Oct 2024 11:08:02 +0200 Subject: [PATCH] nix: add black and isort to the closure (#2619) To make sure that everything is formatted with the same black version as CI. I sometimes use isort for new files to get nicely ordered imports, so add it as well. Also set the isort configuration to format in a way that is compatible with black. --- clients/python/pyproject.toml | 3 +++ integration-tests/pyproject.toml | 3 +++ nix/impure-shell.nix | 4 ++++ server/pyproject.toml | 3 +++ 4 files changed, 13 insertions(+) diff --git a/clients/python/pyproject.toml b/clients/python/pyproject.toml index 2925085b..47ef9d71 100644 --- a/clients/python/pyproject.toml +++ b/clients/python/pyproject.toml @@ -27,3 +27,6 @@ asyncio_mode = "auto" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" + +[tool.isort] +profile = "black" diff --git a/integration-tests/pyproject.toml b/integration-tests/pyproject.toml index afd57ea7..e49b98fc 100644 --- a/integration-tests/pyproject.toml +++ b/integration-tests/pyproject.toml @@ -13,3 +13,6 @@ pytest = "^7.4.0" pytest-asyncio = "^0.21.1" docker = "^7" numpy = "^1.20" + +[tool.isort] +profile = "black" diff --git a/nix/impure-shell.nix b/nix/impure-shell.nix index a4dad4ba..abed544a 100644 --- a/nix/impure-shell.nix +++ b/nix/impure-shell.nix @@ -1,5 +1,7 @@ { mkShell, + black, + isort, openssl, pkg-config, protobuf, @@ -14,6 +16,8 @@ mkShell { buildInputs = [ + black + isort openssl.dev pkg-config (rust-bin.stable.latest.default.override { diff --git a/server/pyproject.toml b/server/pyproject.toml index 08f305e6..6ea4718d 100644 --- a/server/pyproject.toml +++ b/server/pyproject.toml @@ -82,3 +82,6 @@ requires = [ "poetry-core>=1.0.0", ] build-backend = "poetry.core.masonry.api" + +[tool.isort] +profile = "black"