Skip to content

Commit f1ad7b3

Browse files
committed
Declare strict mode for zip()
1 parent 58afa8b commit f1ad7b3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

python/lsst/sconsUtils/builders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def _quote_paths(pathList):
431431
outConfigFile.write(f"FILE_PATTERNS = {' '.join(self.patterns)}\n")
432432
outConfigFile.write("RECURSIVE = YES\n" if self.recursive else "RECURSIVE = NO\n")
433433
allOutputs = {"html", "latex", "man", "rtf", "xml"}
434-
for output, path in zip(self.outputs, self.outputPaths):
434+
for output, path in zip(self.outputs, self.outputPaths, strict=True):
435435
try:
436436
allOutputs.remove(output.lower())
437437
except Exception:

python/lsst/sconsUtils/scripts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def rewrite_shebang(target, source, env):
369369
"""Copy source to target, rewriting the shebang"""
370370
# Currently just use this python
371371
usepython = utils.whichPython()
372-
for targ, src in zip(target, source):
372+
for targ, src in zip(target, source, strict=True):
373373
with open(str(src)) as srcfd:
374374
with open(str(targ), "w") as outfd:
375375
first_line = srcfd.readline()
@@ -642,7 +642,7 @@ def tests(
642642
if swigSrc is None:
643643
swigSrc = {}
644644
allSwigSrc = set()
645-
for name, node in zip(swigNameList, swigFileList):
645+
for name, node in zip(swigNameList, swigFileList, strict=True):
646646
src = swigSrc.setdefault(name, [])
647647
allSwigSrc.update(str(element) for element in src)
648648
src.append(node)
@@ -760,7 +760,7 @@ def examples(ccList=None, swigNameList=None, swigSrc=None):
760760
if swigSrc is None:
761761
swigSrc = {}
762762
allSwigSrc = set()
763-
for name, node in zip(swigNameList, swigFileList):
763+
for name, node in zip(swigNameList, swigFileList, strict=True):
764764
src = swigSrc.setdefault(name, [])
765765
allSwigSrc.update(str(element) for element in src)
766766
src.append(node)

0 commit comments

Comments
 (0)