From 3cb7404841543bb7b0e9671d99838e8f8e22e618 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Thu, 25 Jun 2026 07:36:05 +0800 Subject: [PATCH] gh-51067: Remove trailing space in `_Repacker.repack()` error message Remove an accidental trailing space inside the `BadZipFile` exception string literal to ensure clean exception messages. --- Lib/zipfile/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/zipfile/__init__.py b/Lib/zipfile/__init__.py index 084a47518a935cc..d4d67054d052ce6 100644 --- a/Lib/zipfile/__init__.py +++ b/Lib/zipfile/__init__.py @@ -1514,7 +1514,7 @@ def repack(self, zfile, removed=None): zinfo.header_offset, entry_size, used_entry_size) if used_entry_size > entry_size: raise BadZipFile( - f"Overlapped entries: {zinfo.orig_filename!r} ") + f"Overlapped entries: {zinfo.orig_filename!r}") if removed is not None and zinfo not in removed_zinfos: used_entry_size = entry_size