diff --git a/flake.lock b/flake.lock index 7f5a4bd..4c7869f 100644 --- a/flake.lock +++ b/flake.lock @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1720022903, - "narHash": "sha256-TLiEulaY4I+vwaJIHQXASVQva+2nepaziUomigYY9+0=", + "lastModified": 1720459846, + "narHash": "sha256-3gf8pkyp/yjFdLJo7PSQ/Vmta9QBPWfKs5SFc/wh3h4=", "owner": "Nixos", "repo": "nixpkgs", - "rev": "88f3dab52d2cc42945f70f4e84c4505dedaa377d", + "rev": "c030874db3ce4ff192aabf059988ed1be95d167a", "type": "github" }, "original": { @@ -50,11 +50,11 @@ ] }, "locked": { - "lastModified": 1719887753, - "narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=", + "lastModified": 1720436211, + "narHash": "sha256-/cKXod0oGLl+vH4bKBZnTV3qxrw4jgOLnyQ8KXey5J8=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c", + "rev": "6fc8bded78715cdd43a3278a14ded226eb3a239e", "type": "github" }, "original": { diff --git a/nix/treefmt/flake-module.nix b/nix/treefmt/flake-module.nix index 4aef50e..5c82312 100644 --- a/nix/treefmt/flake-module.nix +++ b/nix/treefmt/flake-module.nix @@ -8,6 +8,8 @@ programs.nixpkgs-fmt.enable = true; programs.shellcheck.enable = true; programs.deno.enable = true; + programs.ruff.check = true; + programs.ruff.format = true; settings.formatter.shellcheck.options = [ "-s" "bash" ]; programs.mypy = { @@ -16,18 +18,9 @@ pkgs.python3.pkgs.twisted ]; }; - settings.formatter.python = { - command = "sh"; - options = [ - "-eucx" - '' - ${pkgs.ruff}/bin/ruff --fix "$@" - ${pkgs.ruff}/bin/ruff format "$@" - '' - "--" # this argument is ignored by bash - ]; - includes = [ "*.py" ]; - }; + + settings.formatter.ruff-check.priority = 1; + settings.formatter.ruff-format.priority = 2; }; }; }