From 7d7e0c02351303489d5555627337a39b519b536a Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 16 Aug 2023 14:18:10 -0400 Subject: Get python targets building I added 'black' to Biz/Lint.hs, but not the others because they rely on dependencies being in the PYTHONPATH to work, so they are only relevant in nix builds and repls. I also made some other tweaks to the python checkPhase and linted all the files. Everything should be building and linting correctly now. --- Biz/Lint.hs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Biz/Lint.hs') diff --git a/Biz/Lint.hs b/Biz/Lint.hs index f9b16d0..be73229 100644 --- a/Biz/Lint.hs +++ b/Biz/Lint.hs @@ -123,6 +123,14 @@ hlint = fixArgs = Nothing } +black :: Linter +black = + Linter + { exe = "black", + checkArgs = ["--check"], + fixArgs = Just [] + } + deadnix :: Linter deadnix = Linter @@ -164,7 +172,9 @@ runOne mode root cwd path_ = results +> traverse_ printResult >> results [ lint mode ormolu path_, lint mode hlint path_ ] - Just (Namespace _ Py) -> [] -- python linters are run in Builder.nix checkPhase + Just (Namespace _ Py) -> + [ lint mode black path_ + ] Just (Namespace _ Sh) -> [lint mode shellcheck path_] Just (Namespace _ Nix) -> [lint mode deadnix path_] Just (Namespace _ Scm) -> [pure <| NoOp path_] -- cgit v1.2.3