From 6d9f25ddfd1bab65e7de79f46e95a33eeb43cfeb Mon Sep 17 00:00:00 2001 From: erodrigu <eduardo.rodrigues@cern.ch> Date: Wed, 28 Jun 2023 11:09:21 +0200 Subject: [PATCH 1/5] Add pyupgrade pre-commit hook --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c525a92d4..17c766e84 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,6 +30,11 @@ repos: "--skip", "Phys/AnalysisPython/*,Phys/DaVinciTrackScaling/*" ] + - repo: https://github.com/asottile/pyupgrade + rev: v3.4.0 + hooks: + - id: pyupgrade + args: ["--py39-plus"] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: -- GitLab From b368aabebcee74c07d48c2ef059cf9c1cf6edd4f Mon Sep 17 00:00:00 2001 From: erodrigu <eduardo.rodrigues@cern.ch> Date: Wed, 28 Jun 2023 11:09:35 +0200 Subject: [PATCH 2/5] Ran pyupgrade for Python 3.9+ --- .../python/AnalysisPython/DebugMCAssoc.py | 4 +--- Phys/AnalysisPython/python/AnalysisPython/Dir.py | 4 +--- .../python/AnalysisPython/DumpRootObjects.py | 4 +--- Phys/AnalysisPython/python/AnalysisPython/Functors.py | 4 +--- Phys/AnalysisPython/python/AnalysisPython/Helpers.py | 4 +--- .../python/AnalysisPython/HistoUtils.py | 3 +-- Phys/AnalysisPython/python/AnalysisPython/Logger.py | 9 ++++----- Phys/AnalysisPython/python/AnalysisPython/Rewind.py | 4 +--- Phys/AnalysisPython/python/AnalysisPython/__init__.py | 3 +-- Phys/AnalysisPython/python/AnalysisPython/uStat.py | 4 +--- .../python/DaVinciTrackScaling/covariance_scale.py | 5 ++--- .../python/DaVinciTrackScaling/momentum_scale.py | 11 +++++------ .../python/DaVinciTrackScaling/momentum_smear.py | 5 ++--- Phys/FunTuple/python/FunTuple/FunctorCollection.py | 2 +- Phys/FunTuple/python/FunTuple/functorcollections.py | 8 ++++---- 15 files changed, 27 insertions(+), 47 deletions(-) diff --git a/Phys/AnalysisPython/python/AnalysisPython/DebugMCAssoc.py b/Phys/AnalysisPython/python/AnalysisPython/DebugMCAssoc.py index e77c0e0dc..95d8b0a00 100644 --- a/Phys/AnalysisPython/python/AnalysisPython/DebugMCAssoc.py +++ b/Phys/AnalysisPython/python/AnalysisPython/DebugMCAssoc.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- ############################################################################### -# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # @@ -9,7 +8,6 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ############################################################################### -from __future__ import print_function from AnalysisPython import Helpers diff --git a/Phys/AnalysisPython/python/AnalysisPython/Dir.py b/Phys/AnalysisPython/python/AnalysisPython/Dir.py index 5f82cbecb..9ec52d788 100644 --- a/Phys/AnalysisPython/python/AnalysisPython/Dir.py +++ b/Phys/AnalysisPython/python/AnalysisPython/Dir.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- ############################################################################### -# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # @@ -9,7 +8,6 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ############################################################################### -from __future__ import print_function from GaudiPython.Bindings import iDataSvc, SUCCESS, FAILURE diff --git a/Phys/AnalysisPython/python/AnalysisPython/DumpRootObjects.py b/Phys/AnalysisPython/python/AnalysisPython/DumpRootObjects.py index d1de73900..402447d14 100755 --- a/Phys/AnalysisPython/python/AnalysisPython/DumpRootObjects.py +++ b/Phys/AnalysisPython/python/AnalysisPython/DumpRootObjects.py @@ -1,7 +1,6 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- ############################################################################### -# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # @@ -44,7 +43,6 @@ And it is based on the LoKi project: ``C++ ToolKit for Smart and Friendly Physics Analysis'' """ # ============================================================================= -from __future__ import print_function __author__ = "Vanya BELYAEV Ivan.Belyaev@itep.ru" __date__ = "2012-03-16" diff --git a/Phys/AnalysisPython/python/AnalysisPython/Functors.py b/Phys/AnalysisPython/python/AnalysisPython/Functors.py index 6ca73b907..ad3364244 100644 --- a/Phys/AnalysisPython/python/AnalysisPython/Functors.py +++ b/Phys/AnalysisPython/python/AnalysisPython/Functors.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- ############################################################################### -# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # @@ -28,7 +27,6 @@ analysis in GaudiPython. it exports the following classes: - ContainerLoop - ContainerRecursiveLoop """ -from __future__ import print_function __author__ = "Juan PALACIOS juan.palacios@nikhef.nl" # ============================================================================== diff --git a/Phys/AnalysisPython/python/AnalysisPython/Helpers.py b/Phys/AnalysisPython/python/AnalysisPython/Helpers.py index 2fd79ba21..1970c88d8 100644 --- a/Phys/AnalysisPython/python/AnalysisPython/Helpers.py +++ b/Phys/AnalysisPython/python/AnalysisPython/Helpers.py @@ -1,7 +1,6 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- ############################################################################### -# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # @@ -14,7 +13,6 @@ This module contains a set of random helper functions for GaudiPython analysis. """ -from __future__ import print_function __author__ = "Juan PALACIOS juan.palacios@nikhef.nl" from ROOT import Double diff --git a/Phys/AnalysisPython/python/AnalysisPython/HistoUtils.py b/Phys/AnalysisPython/python/AnalysisPython/HistoUtils.py index 26a4c57d1..bfe115ce9 100755 --- a/Phys/AnalysisPython/python/AnalysisPython/HistoUtils.py +++ b/Phys/AnalysisPython/python/AnalysisPython/HistoUtils.py @@ -1,7 +1,6 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # diff --git a/Phys/AnalysisPython/python/AnalysisPython/Logger.py b/Phys/AnalysisPython/python/AnalysisPython/Logger.py index 7a4146a16..3e4f3d077 100644 --- a/Phys/AnalysisPython/python/AnalysisPython/Logger.py +++ b/Phys/AnalysisPython/python/AnalysisPython/Logger.py @@ -1,7 +1,6 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # @@ -267,7 +266,7 @@ def getLogger( # @endcode # @author Vanya BELYAEV Ivan.Belyaev@itep.ru # @date 2014-01-1 -class LogLevel(object): +class LogLevel: """Temporarily enable/disable certain logger levels >>> with LogLevel( logging.CRITICAL ) : ... do something here ... @@ -490,7 +489,7 @@ def make_colors(): # with ColorLogging(): # ... do something ... # @endcode -class ColorLogging(object): +class ColorLogging: """Simple context manager to swith on coloring >>> with ColorLogging() : @@ -567,7 +566,7 @@ def noColor(): # with KeepColorLogging(): # ... do something ... # @endcode -class KeepColorLogging(object): +class KeepColorLogging: """Simple context manager to preserve coloring >>> with KeepColorLogging() : diff --git a/Phys/AnalysisPython/python/AnalysisPython/Rewind.py b/Phys/AnalysisPython/python/AnalysisPython/Rewind.py index f9dde9f87..ca8b419cb 100644 --- a/Phys/AnalysisPython/python/AnalysisPython/Rewind.py +++ b/Phys/AnalysisPython/python/AnalysisPython/Rewind.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- ############################################################################### -# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # @@ -9,7 +8,6 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ############################################################################### -from __future__ import print_function from GaudiPython.Bindings import iHistogramSvc, AppMgr, SUCCESS, FAILURE from AnalysisPython import Dir diff --git a/Phys/AnalysisPython/python/AnalysisPython/__init__.py b/Phys/AnalysisPython/python/AnalysisPython/__init__.py index 219e65d95..fec9a66c4 100644 --- a/Phys/AnalysisPython/python/AnalysisPython/__init__.py +++ b/Phys/AnalysisPython/python/AnalysisPython/__init__.py @@ -1,7 +1,6 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # diff --git a/Phys/AnalysisPython/python/AnalysisPython/uStat.py b/Phys/AnalysisPython/python/AnalysisPython/uStat.py index 664ef00b4..19659dcc0 100644 --- a/Phys/AnalysisPython/python/AnalysisPython/uStat.py +++ b/Phys/AnalysisPython/python/AnalysisPython/uStat.py @@ -1,7 +1,6 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- ############################################################################### -# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # @@ -61,7 +60,6 @@ Usage is fairly trivial: """ # ============================================================================ -from __future__ import print_function __author__ = "Vanya BELYAEV Ivan.Belyaev@cern.ch" __date__ = "2010-09-21" diff --git a/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/covariance_scale.py b/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/covariance_scale.py index 39d4cf343..f81c50af7 100644 --- a/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/covariance_scale.py +++ b/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/covariance_scale.py @@ -1,6 +1,6 @@ #!/usr/bin/env python ############################################################################### -# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # @@ -34,7 +34,6 @@ """ # ============================================================================ -from __future__ import print_function __author__ = "Vanya BELYAEV Ivan.Belyaev@itep.ru" __date__ = "2013-04-20" @@ -87,7 +86,7 @@ smear = PARAM( histo.toString(), name="Scale", type="Histo1D", - comment="Covariance scale %s %s %s " % (sim, reco, year), + comment="Covariance scale {} {} {} ".format(sim, reco, year), ) document = DDDB( diff --git a/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_scale.py b/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_scale.py index 81a955001..e19e63bec 100644 --- a/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_scale.py +++ b/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_scale.py @@ -1,6 +1,6 @@ #!/usr/bin/env python ############################################################################### -# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # @@ -47,7 +47,6 @@ Input data are specified close to the start of the script """ # ============================================================================ -from __future__ import print_function __author__ = "Vanya BELYAEV Ivan.Belyaev@itep.ru" __date__ = "2013-04-20" @@ -132,28 +131,28 @@ def buildXML(reco, year, idp_plus, idp_minus, offsets, delta): str(delta), name="Delta", type="double", - comment="Global delta scale %s %s" % (reco, year), + comment="Global delta scale {} {}".format(reco, year), ) xml_idplus = PARAM( idp_plus.toString(), name="IdpPlus", type="Histo2D", - comment="Calibration for IdpPlus %s %s" % (reco, year), + comment="Calibration for IdpPlus {} {}".format(reco, year), ) xml_idpminus = PARAM( idp_minus.toString(), name="IdpMinus", type="Histo2D", - comment="Calibration for IdpMinus %s %s" % (reco, year), + comment="Calibration for IdpMinus {} {}".format(reco, year), ) xml_offsets = PARAM( offsets_to_histo(offsets, "Run-dependent offsets").toString(), name="Offsets", type="Histo1D", - comment="Run-dependent offsets %s %s" % (reco, year), + comment="Run-dependent offsets {} {}".format(reco, year), ) document = DDDB( diff --git a/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_smear.py b/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_smear.py index ed235539a..d7191b903 100644 --- a/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_smear.py +++ b/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_smear.py @@ -1,6 +1,6 @@ #!/usr/bin/env python ############################################################################### -# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration # # # # This software is distributed under the terms of the GNU General Public # # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # @@ -34,7 +34,6 @@ """ # ============================================================================ -from __future__ import print_function __author__ = "Vanya BELYAEV Ivan.Belyaev@itep.ru" __date__ = "2013-04-20" @@ -94,7 +93,7 @@ smear = PARAM( histo.toString(), name="Smear", type="Histo1D", - comment="Momentum Smearing %s %s %s " % (sim, reco, year), + comment="Momentum Smearing {} {} {} ".format(sim, reco, year), ) document = DDDB( diff --git a/Phys/FunTuple/python/FunTuple/FunctorCollection.py b/Phys/FunTuple/python/FunTuple/FunctorCollection.py index 78d65c133..287787423 100644 --- a/Phys/FunTuple/python/FunTuple/FunctorCollection.py +++ b/Phys/FunTuple/python/FunTuple/FunctorCollection.py @@ -147,7 +147,7 @@ class FunctorCollection: f"<FunctorCollection object at {hex(id(self))}:\n" + "".join( [ - " {0}: {1}\n".format(key, val) + f" {key}: {val}\n" for key, val in (self.functor_dict).items() ] ) diff --git a/Phys/FunTuple/python/FunTuple/functorcollections.py b/Phys/FunTuple/python/FunTuple/functorcollections.py index c216c0823..5ab2e0b7f 100644 --- a/Phys/FunTuple/python/FunTuple/functorcollections.py +++ b/Phys/FunTuple/python/FunTuple/functorcollections.py @@ -83,7 +83,7 @@ def EventInfo() -> FunctorCollection: def SelectionInfo( - *, selection_type: HltSourceID, trigger_lines: List[str] + *, selection_type: HltSourceID, trigger_lines: list[str] ) -> FunctorCollection: """ " Event-level collection of most-used functors for tupling trigger/Sprucing information. @@ -126,14 +126,14 @@ def SelectionInfo( def _HltMCTrueSimEff( *, selection_type: HltSourceID, - trigger_lines: List[str], + trigger_lines: list[str], mcp_data: DataHandle, dec_reports: DataHandle, mc2IDLink: DataHandle, sel_reports: DataHandle = make_data_with_FetchDataFromFile( "dummy_sel_rep_location" ), - cand_locations: List[str] = ["dummy_line_name_Decision_loc"], + cand_locations: list[str] = ["dummy_line_name_Decision_loc"], ): """ Candidate-level collection to store TrueSim efficiencies for HltEfficiencyChecker @@ -197,7 +197,7 @@ def _HltMCTrueSimEff( def HltTisTos( - *, selection_type: HltSourceID, trigger_lines: List[str], data: DataHandle + *, selection_type: HltSourceID, trigger_lines: list[str], data: DataHandle ) -> FunctorCollection: """ Candidate-level collection to store TIS (Trigger Independent of Signal) or TOS (Trigger On Signal) -- GitLab From 97aeee665ad8e680dcfb1d380ef4451da940aef6 Mon Sep 17 00:00:00 2001 From: Gitlab CI <noreply@cern.ch> Date: Wed, 28 Jun 2023 09:12:55 +0000 Subject: [PATCH 3/5] pre-commit fixes patch generated by https://gitlab.cern.ch/lhcb/Analysis/-/jobs/30629740 --- .../python/DaVinciTrackScaling/covariance_scale.py | 2 +- .../python/DaVinciTrackScaling/momentum_scale.py | 8 ++++---- .../python/DaVinciTrackScaling/momentum_smear.py | 2 +- Phys/FunTuple/python/FunTuple/FunctorCollection.py | 5 +---- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/covariance_scale.py b/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/covariance_scale.py index f81c50af7..d11fbd40d 100644 --- a/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/covariance_scale.py +++ b/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/covariance_scale.py @@ -86,7 +86,7 @@ smear = PARAM( histo.toString(), name="Scale", type="Histo1D", - comment="Covariance scale {} {} {} ".format(sim, reco, year), + comment=f"Covariance scale {sim} {reco} {year} ", ) document = DDDB( diff --git a/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_scale.py b/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_scale.py index e19e63bec..f06bbaa3e 100644 --- a/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_scale.py +++ b/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_scale.py @@ -131,28 +131,28 @@ def buildXML(reco, year, idp_plus, idp_minus, offsets, delta): str(delta), name="Delta", type="double", - comment="Global delta scale {} {}".format(reco, year), + comment=f"Global delta scale {reco} {year}", ) xml_idplus = PARAM( idp_plus.toString(), name="IdpPlus", type="Histo2D", - comment="Calibration for IdpPlus {} {}".format(reco, year), + comment=f"Calibration for IdpPlus {reco} {year}", ) xml_idpminus = PARAM( idp_minus.toString(), name="IdpMinus", type="Histo2D", - comment="Calibration for IdpMinus {} {}".format(reco, year), + comment=f"Calibration for IdpMinus {reco} {year}", ) xml_offsets = PARAM( offsets_to_histo(offsets, "Run-dependent offsets").toString(), name="Offsets", type="Histo1D", - comment="Run-dependent offsets {} {}".format(reco, year), + comment=f"Run-dependent offsets {reco} {year}", ) document = DDDB( diff --git a/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_smear.py b/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_smear.py index d7191b903..b99ee4177 100644 --- a/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_smear.py +++ b/Phys/DaVinciTrackScaling/python/DaVinciTrackScaling/momentum_smear.py @@ -93,7 +93,7 @@ smear = PARAM( histo.toString(), name="Smear", type="Histo1D", - comment="Momentum Smearing {} {} {} ".format(sim, reco, year), + comment=f"Momentum Smearing {sim} {reco} {year} ", ) document = DDDB( diff --git a/Phys/FunTuple/python/FunTuple/FunctorCollection.py b/Phys/FunTuple/python/FunTuple/FunctorCollection.py index 287787423..04e05d883 100644 --- a/Phys/FunTuple/python/FunTuple/FunctorCollection.py +++ b/Phys/FunTuple/python/FunTuple/FunctorCollection.py @@ -146,10 +146,7 @@ class FunctorCollection: return ( f"<FunctorCollection object at {hex(id(self))}:\n" + "".join( - [ - f" {key}: {val}\n" - for key, val in (self.functor_dict).items() - ] + [f" {key}: {val}\n" for key, val in (self.functor_dict).items()] ) + ">" ) -- GitLab From a6537ead2bade6f33a57383af5adec4996d7bb33 Mon Sep 17 00:00:00 2001 From: erodrigu <eduardo.rodrigues@cern.ch> Date: Wed, 28 Jun 2023 11:16:15 +0200 Subject: [PATCH 4/5] Remove unnecessary import --- Phys/FunTuple/python/FunTuple/functorcollections.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Phys/FunTuple/python/FunTuple/functorcollections.py b/Phys/FunTuple/python/FunTuple/functorcollections.py index 5ab2e0b7f..43b5122ef 100644 --- a/Phys/FunTuple/python/FunTuple/functorcollections.py +++ b/Phys/FunTuple/python/FunTuple/functorcollections.py @@ -15,7 +15,7 @@ Refer to the docstrings of the collections in this submodule for examples of typical usage. """ -from typing import List, Optional +from typing import Optional from GaudiKernel import SystemOfUnits # type: ignore[import] from GaudiConf.LbExec import HltSourceID # type: ignore[import] -- GitLab From 68349721ac13574d971d6e9fa0e18b3facf5d978 Mon Sep 17 00:00:00 2001 From: erodrigu <eduardo.rodrigues@cern.ch> Date: Wed, 28 Jun 2023 11:21:25 +0200 Subject: [PATCH 5/5] Strange, Mypy Ok locally but failed on the CI. --- Phys/FunTuple/python/FunTuple/functorcollections.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Phys/FunTuple/python/FunTuple/functorcollections.py b/Phys/FunTuple/python/FunTuple/functorcollections.py index 43b5122ef..810d804e6 100644 --- a/Phys/FunTuple/python/FunTuple/functorcollections.py +++ b/Phys/FunTuple/python/FunTuple/functorcollections.py @@ -25,7 +25,7 @@ from PyConf.application import make_data_with_FetchDataFromFile # type: ignore[ from PyConf.dataflow import DataHandle # type: ignore[import] from PyConf.components import Algorithm # type: ignore[import] from PyConf.Algorithms import HltTisTosAlg, Hlt1TrueSimEffAlg, Hlt2TrueSimEffAlg # type: ignore[import] -import DaVinciMCTools # for MCReconstructible, MCReconstructed and MCTruthAndBkgCat helper classes +import DaVinciMCTools # type: ignore[import] from DecayTreeFitter import DecayTreeFitter # type: ignore[import] from .FunctorCollection import FunctorCollection -- GitLab