tribuchet: building on mac02 treefmt v2.6.0traversed 173 files emitted 154 files for processing formatted 154 files (2 changed) in 1.672s M nix_update/patches.py M tests/test_patches.py diff --git a/nix_update/patches.py b/nix_update/patches.py index 717fc03..c699b87 100644 --- a/nix_update/patches.py +++ b/nix_update/patches.py @@ -163,7 +163,9 @@ def drop_merged_patches(opts: Options, package: Package) -> None: if not package.patches or package.patches_position is None: return merged = _merged_patch_indices(opts) - dropped = drop_patch_indices(package.filename, package.patches_position.line, merged) + dropped = drop_patch_indices( + package.filename, package.patches_position.line, merged + ) for index in sorted(dropped): patch = Path(str(package.patches[index]["path"])).name info(f"Drop patch already applied upstream: {patch}") diff --git a/tests/test_patches.py b/tests/test_patches.py index b9559b0..ea58988 100644 --- a/tests/test_patches.py +++ b/tests/test_patches.py @@ -21,10 +21,13 @@ def test_drop_local_and_fetchpatch_expressions(tmp_path: Path) -> None: drop_patch_indices(str(expression), 1, {1, 2}) - assert expression.read_text() == """patches = [ + 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: