From d5c6b4bfe8c532ba8b107c9a4b2c8495857e44ab Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 8 Jul 2024 23:51:41 +0000 Subject: [PATCH 1/2] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:Nixos/nixpkgs/88f3dab52d2cc42945f70f4e84c4505dedaa377d?narHash=sha256-TLiEulaY4I%2BvwaJIHQXASVQva%2B2nepaziUomigYY9%2B0%3D' (2024-07-03) → 'github:Nixos/nixpkgs/c030874db3ce4ff192aabf059988ed1be95d167a?narHash=sha256-3gf8pkyp/yjFdLJo7PSQ/Vmta9QBPWfKs5SFc/wh3h4%3D' (2024-07-08) • Updated input 'treefmt-nix': 'github:numtide/treefmt-nix/bdb6355009562d8f9313d9460c0d3860f525bc6c?narHash=sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII%2BXXHDHqek%3D' (2024-07-02) → 'github:numtide/treefmt-nix/6fc8bded78715cdd43a3278a14ded226eb3a239e?narHash=sha256-/cKXod0oGLl%2BvH4bKBZnTV3qxrw4jgOLnyQ8KXey5J8%3D' (2024-07-08) --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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": { From ff3821bd05aa7819384cb126011f868594dc6a09 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Tue, 9 Jul 2024 09:54:08 +1000 Subject: [PATCH 2/2] treefmt: update ruff settings --- nix/treefmt/flake-module.nix | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) 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; }; }; }