Skip to content

Commit

Permalink
nix: add black and isort to the closure
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danieldk committed Oct 9, 2024
1 parent 8ad20da commit 415d29f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clients/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 3 additions & 0 deletions integration-tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ pytest = "^7.4.0"
pytest-asyncio = "^0.21.1"
docker = "^7"
numpy = "^1.20"

[tool.isort]
profile = "black"
4 changes: 4 additions & 0 deletions nix/impure-shell.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
mkShell,
black,
isort,
openssl,
pkg-config,
protobuf,
Expand All @@ -14,6 +16,8 @@
mkShell {
buildInputs =
[
black
isort
openssl.dev
pkg-config
(rust-bin.stable.latest.default.override {
Expand Down
3 changes: 3 additions & 0 deletions server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ requires = [
"poetry-core>=1.0.0",
]
build-backend = "poetry.core.masonry.api"

[tool.isort]
profile = "black"

0 comments on commit 415d29f

Please sign in to comment.