From 3bc2f08a278ef96fe574d5e763b34d1a9eccb034 Mon Sep 17 00:00:00 2001 From: "Marcel R." Date: Mon, 3 Feb 2025 14:33:25 +0100 Subject: [PATCH] Please the linter. --- hbt/config/configs_hbt.py | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/hbt/config/configs_hbt.py b/hbt/config/configs_hbt.py index 20adf22d..b7c7263d 100644 --- a/hbt/config/configs_hbt.py +++ b/hbt/config/configs_hbt.py @@ -28,6 +28,7 @@ logger = law.logger.get_logger(__name__) + def add_config( analysis: od.Analysis, campaign: od.Campaign, @@ -1326,39 +1327,35 @@ def add_external(name, value): dataset.x.event_weights = {"top_pt_weight": get_shifts("top_pt")} cfg.x.shift_groups = { - "jec": - [ shift_inst.name for shift_inst in cfg.shifts - if shift_inst.has_tag(("jec", "jer")) - ], + "jec": [ + shift_inst.name for shift_inst in cfg.shifts + if shift_inst.has_tag(("jec", "jer")) + ], "lepton_sf": [ - x.name for x in ( - *get_shifts("e"), *get_shifts("mu"), - ) + shift_inst.name for shift_inst in (*get_shifts("e"), *get_shifts("mu")) ], - "tec":[ + "tec": [ shift_inst.name for shift_inst in cfg.shifts - if shift_inst.has_tag(("tec")) + if shift_inst.has_tag(("tec")) ], "eec": [ shift_inst.name for shift_inst in cfg.shifts - if shift_inst.has_tag(("ees", "eer")) + if shift_inst.has_tag(("ees", "eer")) ], "ees": [ shift_inst.name for shift_inst in cfg.shifts - if shift_inst.has_tag(("ees")) + if shift_inst.has_tag(("ees")) ], "eer": [ shift_inst.name for shift_inst in cfg.shifts - if shift_inst.has_tag(("eer")) + if shift_inst.has_tag(("eer")) ], "btag_sf": [ - x.name for x in ( - *get_shifts(*(f"btag_{unc}" for unc in cfg.x.btag_unc_names)), - ) + shift_inst.name for shift_inst in get_shifts(*(f"btag_{unc}" for unc in cfg.x.btag_unc_names)) ], - "pdf": [x.name for x in get_shifts("pdf")], - "murmuf": (x.name for x in get_shifts("murmuf")), - "pu": [x.name for x in get_shifts("minbias_xs")], + "pdf": [shift_inst.name for shift_inst in get_shifts("pdf")], + "murmuf": (shift_inst.name for shift_inst in get_shifts("murmuf")), + "pu": [shift_inst.name for shift_inst in get_shifts("minbias_xs")], } ################################################################################################