treefmt v2.5.0ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1 PTH123 `open()` should be replaced by `Path.open()` --> modules/nixos/hermes/nix-store-binds.py:21:6 | 21 | with open("/proc/cmdline") as f: | ^^^^ 22 | words = f.read().split() 23 | info = next(w.split("=", 1)[1] for w in words if w.startswith("regInfo=")) | help: Replace with `Path.open()` PTH123 `open()` should be replaced by `Path.open()` --> modules/nixos/hermes/nix-store-binds.py:28:6 | 26 | lower = "/sysroot/nix/.ro-store" 27 | store = "/sysroot/nix/store" 28 | with open(f"{lower}/{closure_dir}/store-paths") as f: | ^^^^ 29 | for line in f: 30 | name = line.strip().removeprefix("/nix/store/") | help: Replace with `Path.open()` PTH114 `os.path.islink()` should be replaced by `Path.is_symlink()` --> modules/nixos/hermes/nix-store-binds.py:37:12 | 35 | if os.path.lexists(dst): 36 | continue 37 | if os.path.islink(src): | ^^^^^^^^^^^^^^ 38 | os.symlink(os.readlink(src), dst) 39 | elif os.path.isdir(src): | help: Replace with `Path(...).is_symlink()` PTH211 `os.symlink` should be replaced by `Path.symlink_to` --> modules/nixos/hermes/nix-store-binds.py:38:13 | 36 | continue 37 | if os.path.islink(src): 38 | os.symlink(os.readlink(src), dst) | ^^^^^^^^^^ 39 | elif os.path.isdir(src): 40 | os.mkdir(dst) | help: Replace with `Path(...).symlink_to(...)` PTH115 `os.readlink()` should be replaced by `Path.readlink()` --> modules/nixos/hermes/nix-store-binds.py:38:24 | 36 | continue 37 | if os.path.islink(src): 38 | os.symlink(os.readlink(src), dst) | ^^^^^^^^^^^ 39 | elif os.path.isdir(src): 40 | os.mkdir(dst) | help: Replace with `Path(...).readlink()` PTH112 `os.path.isdir()` should be replaced by `Path.is_dir()` --> modules/nixos/hermes/nix-store-binds.py:39:14 | 37 | if os.path.islink(src): 38 | os.symlink(os.readlink(src), dst) 39 | elif os.path.isdir(src): | ^^^^^^^^^^^^^ 40 | os.mkdir(dst) 41 | bind(src, dst) | help: Replace with `Path(...).is_dir()` PTH102 `os.mkdir()` should be replaced by `Path.mkdir()` --> modules/nixos/hermes/nix-store-binds.py:40:13 | 38 | os.symlink(os.readlink(src), dst) 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