Skip to content

Commit 69ac0b6

Browse files
maxgallianigamova
authored andcommitted
lint combineCards.py
1 parent 72f9971 commit 69ac0b6

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

scripts/combineCards.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -393,20 +393,13 @@ def compareParamSystLines(a, b):
393393
raise RuntimeError("ERROR: mismatch between process signal labels:\n%s" % ("\n".join(process_errors)))
394394

395395
# Remove systematics that don't affect any process/channel in the combination
396-
removed_systs = {
397-
name for name, (pdf, pdfargs, effect, nofloat) in systlines.items()
398-
if not any(effect.get(b, {}).get(p, "-") != "-" for b, p, s in keyline)
399-
}
396+
removed_systs = {name for name, (pdf, pdfargs, effect, nofloat) in systlines.items() if not any(effect.get(b, {}).get(p, "-") != "-" for b, p, s in keyline)}
400397
for name in removed_systs:
401398
del systlines[name]
402399

403400
# Remove pruned systematics from groups - leave all other group members untouched
404401
if removed_systs:
405-
groups = {
406-
gname: nuisanceNames - removed_systs
407-
for gname, nuisanceNames in groups.items()
408-
if nuisanceNames - removed_systs
409-
}
402+
groups = {gname: nuisanceNames - removed_systs for gname, nuisanceNames in groups.items() if nuisanceNames - removed_systs}
410403

411404
print("Combination of", " ".join(args))
412405
print("imax %d number of bins" % len(bins))

0 commit comments

Comments
 (0)