this derivation will be built: /nix/store/vcx11ax77fqzwpsdipcnxaz49j2g29l4-treefmt-check.drv building '/nix/store/vcx11ax77fqzwpsdipcnxaz49j2g29l4-treefmt-check.drv' treefmt-check> tribuchet: building on jamie treefmt-check> treefmt v2.6.0traversed 173 files treefmt-check> emitted 154 files for processing treefmt-check> formatted 154 files (2 changed) in 221ms treefmt-check> M nix_update/patches.py treefmt-check> M tests/test_patches.py treefmt-check> diff --git a/nix_update/patches.py b/nix_update/patches.py treefmt-check> index 717fc03..c699b87 100644 treefmt-check> --- a/nix_update/patches.py treefmt-check> +++ b/nix_update/patches.py treefmt-check> @@ -163,7 +163,9 @@ def drop_merged_patches(opts: Options, package: Package) -> None: treefmt-check> if not package.patches or package.patches_position is None: treefmt-check> return treefmt-check> merged = _merged_patch_indices(opts) treefmt-check> - dropped = drop_patch_indices(package.filename, package.patches_position.line, merged) treefmt-check> + dropped = drop_patch_indices( treefmt-check> + package.filename, package.patches_position.line, merged treefmt-check> + ) treefmt-check> for index in sorted(dropped): treefmt-check> patch = Path(str(package.patches[index]["path"])).name treefmt-check> info(f"Drop patch already applied upstream: {patch}") treefmt-check> diff --git a/tests/test_patches.py b/tests/test_patches.py treefmt-check> index b9559b0..ea58988 100644 treefmt-check> --- a/tests/test_patches.py treefmt-check> +++ b/tests/test_patches.py treefmt-check> @@ -21,10 +21,13 @@ def test_drop_local_and_fetchpatch_expressions(tmp_path: Path) -> None: treefmt-check> treefmt-check> drop_patch_indices(str(expression), 1, {1, 2}) treefmt-check> treefmt-check> - assert expression.read_text() == """patches = [ treefmt-check> + assert ( treefmt-check> + expression.read_text() treefmt-check> + == """patches = [ treefmt-check> ./keep.patch treefmt-check> ]; treefmt-check> """ treefmt-check> + ) treefmt-check> treefmt-check> treefmt-check> def test_arbitrary_patch_expression_is_removed_by_index(tmp_path: Path) -> None: treefmt-check> @@ -38,10 +41,13 @@ def test_arbitrary_patch_expression_is_removed_by_index(tmp_path: Path) -> None: treefmt-check> treefmt-check> drop_patch_indices(str(expression), 1, {1}) treefmt-check> treefmt-check> - assert expression.read_text() == """patches = [ treefmt-check> + assert ( treefmt-check> + expression.read_text() treefmt-check> + == """patches = [ treefmt-check> ./fix.patch treefmt-check> ]; treefmt-check> """ treefmt-check> + ) treefmt-check> treefmt-check> treefmt-check> def test_compact_patch_list_entry_is_removed(tmp_path: Path) -> None: error: Cannot build '/nix/store/vcx11ax77fqzwpsdipcnxaz49j2g29l4-treefmt-check.drv'. Reason: builder failed with exit code 1. Output paths: /nix/store/8s6c3i70slgmnr3vq63bmph6k1wz7l6q-treefmt-check Last 25 log lines: > + assert ( > + expression.read_text() > + == """patches = [ > ./keep.patch > ]; > """ > + ) > > > def test_arbitrary_patch_expression_is_removed_by_index(tmp_path: Path) -> None: > @@ -38,10 +41,13 @@ def test_arbitrary_patch_expression_is_removed_by_index(tmp_path: Path) -> None: > > drop_patch_indices(str(expression), 1, {1}) > > - assert expression.read_text() == """patches = [ > + assert ( > + expression.read_text() > + == """patches = [ > ./fix.patch > ]; > """ > + ) > > > def test_compact_patch_list_entry_is_removed(tmp_path: Path) -> None: For full logs, run: nix log /nix/store/vcx11ax77fqzwpsdipcnxaz49j2g29l4-treefmt-check.drv