Skip to content

Commit 7ecb67d

Browse files
committed
api: make the zip() usage clearer
We manually enforce matching lengths but there's no harm in doing this too. Signed-off-by: Jussi Kukkonen <[email protected]>
1 parent 0785c78 commit 7ecb67d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tuf/api/_payload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ def _is_target_in_pathpattern(targetpath: str, pathpattern: str) -> bool:
11911191

11921192
# Every part in the pathpattern could include a glob pattern, that's why
11931193
# each of the target and pathpattern parts should match.
1194-
for target, pattern in zip(target_parts, pattern_parts, strict=False):
1194+
for target, pattern in zip(target_parts, pattern_parts, strict=True):
11951195
if not fnmatch.fnmatch(target, pattern):
11961196
return False
11971197

0 commit comments

Comments
 (0)