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.
This commit is contained in:
Daniël de Kok 2024-10-09 11:08:02 +02:00 committed by GitHub
parent 8ad20daf33
commit 9ed0c85fe1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 0 deletions

View File

@ -27,3 +27,6 @@ asyncio_mode = "auto"
[build-system] [build-system]
requires = ["poetry-core>=1.0.0"] requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api" build-backend = "poetry.core.masonry.api"
[tool.isort]
profile = "black"

View File

@ -13,3 +13,6 @@ pytest = "^7.4.0"
pytest-asyncio = "^0.21.1" pytest-asyncio = "^0.21.1"
docker = "^7" docker = "^7"
numpy = "^1.20" numpy = "^1.20"
[tool.isort]
profile = "black"

View File

@ -1,5 +1,7 @@
{ {
mkShell, mkShell,
black,
isort,
openssl, openssl,
pkg-config, pkg-config,
protobuf, protobuf,
@ -14,6 +16,8 @@
mkShell { mkShell {
buildInputs = buildInputs =
[ [
black
isort
openssl.dev openssl.dev
pkg-config pkg-config
(rust-bin.stable.latest.default.override { (rust-bin.stable.latest.default.override {

View File

@ -82,3 +82,6 @@ requires = [
"poetry-core>=1.0.0", "poetry-core>=1.0.0",
] ]
build-backend = "poetry.core.masonry.api" build-backend = "poetry.core.masonry.api"
[tool.isort]
profile = "black"