Skip to content

Commit 8eaf2d8

Browse files
committed
Clarify comments based on feedback
1 parent a9f627f commit 8eaf2d8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Lib/zipapp.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,9 @@ def create_archive(source, target=None, interpreter=None, main=None,
147147
# thorough checks don't provide enough value to justify the extra
148148
# cost.
149149

150-
# https://github.com/python/cpython/issues/104527 tracks making
151-
# the zipfile module catch writing an archive to itself at a
152-
# lower level, which could help here in cases that our check
153-
# doesn't catch.
150+
# If target is a file-like object, it will simply fail to compare
151+
# equal to any of the entries in files_to_add, so there's no need
152+
# to add a special check for that.
154153
if target in files_to_add:
155154
raise ZipAppError(
156155
f"The target archive {target} overwrites one of the source files.")

0 commit comments

Comments
 (0)