From 9f9f89078e20b5646446faa38b627039ccb3db4c Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 4 Mar 2025 15:47:25 +0100 Subject: [PATCH] clean up --- libs/patchwheel/patch.go | 2 -- libs/patchwheel/patch_test.go | 2 -- 2 files changed, 4 deletions(-) diff --git a/libs/patchwheel/patch.go b/libs/patchwheel/patch.go index 1ce59cd2d..a7a8bd500 100644 --- a/libs/patchwheel/patch.go +++ b/libs/patchwheel/patch.go @@ -141,8 +141,6 @@ func PatchWheel(ctx context.Context, path, outputDir string) (string, error) { return outpath, nil } - // Target wheel doesn't exist, proceed with patching - // Create a temporary file in the same directory with a unique name tmpFilename := outpath + fmt.Sprintf(".tmp%d", os.Getpid()) needRemoval := true diff --git a/libs/patchwheel/patch_test.go b/libs/patchwheel/patch_test.go index d46bec66d..ad05acbd8 100644 --- a/libs/patchwheel/patch_test.go +++ b/libs/patchwheel/patch_test.go @@ -25,7 +25,6 @@ func getPythonScriptsDir() string { } func verifyVersion(t *testing.T, tempDir, wheelPath string) { - // Extract the expected version from the wheel filename wheelInfo, err := ParseWheelFilename(wheelPath) require.NoError(t, err) expectedVersion := wheelInfo.Version @@ -144,7 +143,6 @@ func TestPatchWheel(t *testing.T) { require.NoError(t, err) require.Equal(t, patchedWheel, patchedWheel2, "PatchWheel is not idempotent") - // Check that the file wasn't recreated patchedInfo2, err := os.Stat(patchedWheel2) require.NoError(t, err) require.Equal(t, patchedTime, patchedInfo2.ModTime(), "File was recreated when it shouldn't have been")