From 3f8112992abc4878fd57344d29c85b2a1ab84b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 14 Nov 2022 23:40:36 +0100 Subject: [PATCH] add isort to build --- default.nix | 4 ++++ setup.cfg | 3 +++ 2 files changed, 7 insertions(+) diff --git a/default.nix b/default.nix index 6c754d8..e94caf9 100644 --- a/default.nix +++ b/default.nix @@ -12,6 +12,7 @@ python3.pkgs.buildPythonApplication rec { python3.pkgs.pytest python3.pkgs.black python3.pkgs.flake8 + python3.pkgs.isort glibcLocales mypy # technically not a test input, but we need it for development in PATH @@ -24,6 +25,9 @@ python3.pkgs.buildPythonApplication rec { flake8 nix_update echo -e "\x1b[32m## run mypy\x1b[0m" mypy --no-warn-unused-ignores --strict nix_update tests + + echo -e "\x1b[32m## run isort\x1b[0m" + isort . --check-only ''; makeWrapperArgs = [ "--prefix PATH" ":" (lib.makeBinPath [ pkgs.nixVersions.stable or nix_2_4 nixpkgs-fmt nixpkgs-review ]) diff --git a/setup.cfg b/setup.cfg index aca014c..2fe2a64 100644 --- a/setup.cfg +++ b/setup.cfg @@ -41,6 +41,9 @@ restructuredtext = true strict = true[wheel] universal = 1 +[isort] +profile=black + [pycodestyle] max-line-length = 88 # E203 conflicts with black