this derivation will be built: /nix/store/gzh585pczyvqdfglhpkyw7i6faxadzlp-treefmt-check.drv building '/nix/store/gzh585pczyvqdfglhpkyw7i6faxadzlp-treefmt-check.drv' treefmt-check> treefmt v2.5.0ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1 treefmt-check> treefmt-check> PTH123 `open()` should be replaced by `Path.open()` treefmt-check> --> modules/nixos/hermes/nix-store-binds.py:21:6 treefmt-check> | treefmt-check> 21 | with open("/proc/cmdline") as f: treefmt-check> | ^^^^ treefmt-check> 22 | words = f.read().split() treefmt-check> 23 | info = next(w.split("=", 1)[1] for w in words if w.startswith("regInfo=")) treefmt-check> | treefmt-check> help: Replace with `Path.open()` treefmt-check> treefmt-check> PTH123 `open()` should be replaced by `Path.open()` treefmt-check> --> modules/nixos/hermes/nix-store-binds.py:28:6 treefmt-check> | treefmt-check> 26 | lower = "/sysroot/nix/.ro-store" treefmt-check> 27 | store = "/sysroot/nix/store" treefmt-check> 28 | with open(f"{lower}/{closure_dir}/store-paths") as f: treefmt-check> | ^^^^ treefmt-check> 29 | for line in f: treefmt-check> 30 | name = line.strip().removeprefix("/nix/store/") treefmt-check> | treefmt-check> help: Replace with `Path.open()` treefmt-check> treefmt-check> PTH114 `os.path.islink()` should be replaced by `Path.is_symlink()` treefmt-check> --> modules/nixos/hermes/nix-store-binds.py:37:12 treefmt-check> | treefmt-check> 35 | if os.path.lexists(dst): treefmt-check> 36 | continue treefmt-check> 37 | if os.path.islink(src): treefmt-check> | ^^^^^^^^^^^^^^ treefmt-check> 38 | os.symlink(os.readlink(src), dst) treefmt-check> 39 | elif os.path.isdir(src): treefmt-check> | treefmt-check> help: Replace with `Path(...).is_symlink()` treefmt-check> treefmt-check> PTH211 `os.symlink` should be replaced by `Path.symlink_to` treefmt-check> --> modules/nixos/hermes/nix-store-binds.py:38:13 treefmt-check> | treefmt-check> 36 | continue treefmt-check> 37 | if os.path.islink(src): treefmt-check> 38 | os.symlink(os.readlink(src), dst) treefmt-check> | ^^^^^^^^^^ treefmt-check> 39 | elif os.path.isdir(src): treefmt-check> 40 | os.mkdir(dst) treefmt-check> | treefmt-check> help: Replace with `Path(...).symlink_to(...)` treefmt-check> treefmt-check> PTH115 `os.readlink()` should be replaced by `Path.readlink()` treefmt-check> --> modules/nixos/hermes/nix-store-binds.py:38:24 treefmt-check> | treefmt-check> 36 | continue treefmt-check> 37 | if os.path.islink(src): treefmt-check> 38 | os.symlink(os.readlink(src), dst) treefmt-check> | ^^^^^^^^^^^ treefmt-check> 39 | elif os.path.isdir(src): treefmt-check> 40 | os.mkdir(dst) treefmt-check> | treefmt-check> help: Replace with `Path(...).readlink()` treefmt-check> treefmt-check> PTH112 `os.path.isdir()` should be replaced by `Path.is_dir()` treefmt-check> --> modules/nixos/hermes/nix-store-binds.py:39:14 treefmt-check> | treefmt-check> 37 | if os.path.islink(src): treefmt-check> 38 | os.symlink(os.readlink(src), dst) treefmt-check> 39 | elif os.path.isdir(src): treefmt-check> | ^^^^^^^^^^^^^ treefmt-check> 40 | os.mkdir(dst) treefmt-check> 41 | bind(src, dst) treefmt-check> | treefmt-check> help: Replace with `Path(...).is_dir()` treefmt-check> treefmt-check> PTH102 `os.mkdir()` should be replaced by `Path.mkdir()` treefmt-check> --> modules/nixos/hermes/nix-store-binds.py:40:13 treefmt-check> | treefmt-check> 38 | os.symlink(os.readlink(src), dst) treefmt-check> 39 | elif os.path.isdir(src): treefmt-check> 40 | os.mkdir(dst) treefmt-check> | ^^^^^^^^ treefmt-check> 41 | bind(src, dst) treefmt-check> 42 | else: treefmt-check> | treefmt-check> help: Replace with `Path(...).mkdir()` treefmt-check> treefmt-check> PTH123 `open()` should be replaced by `Path.open()` treefmt-check> --> modules/nixos/hermes/nix-store-binds.py:43:13 treefmt-check> | treefmt-check> 41 | bind(src, dst) treefmt-check> 42 | else: treefmt-check> 43 | open(dst, "w").close() treefmt-check> | ^^^^ treefmt-check> 44 | bind(src, dst) treefmt-check> | treefmt-check> help: Replace with `Path.open()` treefmt-check> treefmt-check> Found 8 errors. treefmt-check> treefmt-check> traversed 466 files treefmt-check> emitted 316 files for processing treefmt-check> formatted 184 files (0 changed) in 726ms treefmt-check> Error: failed to finalise formatting: formatting failures detected error: Cannot build '/nix/store/gzh585pczyvqdfglhpkyw7i6faxadzlp-treefmt-check.drv'. Reason: builder failed with exit code 1. Output paths: /nix/store/3z3wm710l74h0zlj0x90swd6j7qknk47-treefmt-check Last 25 log lines: > 39 | elif os.path.isdir(src): > 40 | os.mkdir(dst) > | ^^^^^^^^ > 41 | bind(src, dst) > 42 | else: > | > help: Replace with `Path(...).mkdir()` > > PTH123 `open()` should be replaced by `Path.open()` > --> modules/nixos/hermes/nix-store-binds.py:43:13 > | > 41 | bind(src, dst) > 42 | else: > 43 | open(dst, "w").close() > | ^^^^ > 44 | bind(src, dst) > | > help: Replace with `Path.open()` > > Found 8 errors. > > traversed 466 files > emitted 316 files for processing > formatted 184 files (0 changed) in 726ms > Error: failed to finalise formatting: formatting failures detected For full logs, run: nix log /nix/store/gzh585pczyvqdfglhpkyw7i6faxadzlp-treefmt-check.drv