From e9abdc4bb806a8670e236a1a94585d7cbdd29f66 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Fri, 22 Nov 2024 18:16:06 +0100 Subject: [PATCH] [RECONSTRUCTION] py2/3 compatibility:drop use of __future__ --- CommonTools/ParticleFlow/test/PF2PAT_cfg.py | 1 - EventFilter/CSCRawToDigi/test/testCSCDigi2Raw_cfg.py | 1 - EventFilter/HcalRawToDigi/test/GetBadEvents.py | 1 - .../python/test/Validate_DigiToRawToClusters_cfg.py | 1 - .../python/test/Validate_DigiToRawToDigi_cfg.py | 1 - JetMETCorrections/Modules/test/uploadConstants.py | 1 - MagneticField/Engine/test/regression.py | 1 - .../Interpolation/test/BinaryTablesGeneration/convertTables.py | 1 - .../IsolationAlgos/python/boostedElectronIsolation_cff.py | 1 - PhysicsTools/IsolationAlgos/python/boostedMuonIsolation_cff.py | 1 - PhysicsTools/SelectorUtils/python/VIDSelectorBase.py | 1 - PhysicsTools/SelectorUtils/python/VIDSelectorValidator.py | 1 - PhysicsTools/SelectorUtils/test/pyfwlite_test.py | 1 - RecoBTag/CTagging/test/test_discriminator_presence.py | 1 - .../python/pfMassIndependentDeepDoubleXJetTags_cff.py | 1 - .../python/pfMassIndependentDeepDoubleXV2JetTags_cff.py | 1 - RecoBTag/ONNXRuntime/test/plotDDX.py | 1 - RecoBTag/ONNXRuntime/test/test_deep_doubleb_cfg_AOD.py | 1 - RecoBTag/PerformanceDB/test/plotPerformanceDB.py | 1 - RecoEgamma/EgammaElectronProducers/test/dbs_discovery.py | 1 - RecoLocalCalo/EcalRecProducers/test/compare_csv.py | 1 - RecoLocalCalo/HcalRecAlgos/python/RemoveAddSevLevel.py | 2 -- RecoLocalCalo/HcalRecAlgos/test/test_RecHitReflagger_cfg.py | 1 - .../SiStripClusterizer/test/shotTest_withReClustering_cfg.py | 1 - RecoMET/METFilters/python/GenerateHcalLaserBadRunList.py | 2 -- RecoMET/METFilters/python/hcalLaserEventFilter_cfi.py | 2 -- RecoMET/METFilters/test/filters_cfg.py | 1 - .../python/particleFlowClusterECALUncorrected_cfi.py | 1 - RecoTauTag/Configuration/test/compareTauVariables.py | 1 - RecoTauTag/RecoTau/python/tools/runTauIdMVA.py | 1 - .../python/GlobalSeedsFromTripletsWithVertices_cff.py | 1 - TrackPropagation/RungeKutta/test/findDiff.py | 1 - 32 files changed, 35 deletions(-) diff --git a/CommonTools/ParticleFlow/test/PF2PAT_cfg.py b/CommonTools/ParticleFlow/test/PF2PAT_cfg.py index 69c77aac5a17a..d761be45851f0 100644 --- a/CommonTools/ParticleFlow/test/PF2PAT_cfg.py +++ b/CommonTools/ParticleFlow/test/PF2PAT_cfg.py @@ -1,4 +1,3 @@ -from __future__ import print_function # official example for PF2PAT import FWCore.ParameterSet.Config as cms diff --git a/EventFilter/CSCRawToDigi/test/testCSCDigi2Raw_cfg.py b/EventFilter/CSCRawToDigi/test/testCSCDigi2Raw_cfg.py index a48b6ad29930a..5df038cbaaec1 100644 --- a/EventFilter/CSCRawToDigi/test/testCSCDigi2Raw_cfg.py +++ b/EventFilter/CSCRawToDigi/test/testCSCDigi2Raw_cfg.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing diff --git a/EventFilter/HcalRawToDigi/test/GetBadEvents.py b/EventFilter/HcalRawToDigi/test/GetBadEvents.py index 8ecd705ce3931..7cf6ca1718c59 100755 --- a/EventFilter/HcalRawToDigi/test/GetBadEvents.py +++ b/EventFilter/HcalRawToDigi/test/GetBadEvents.py @@ -5,7 +5,6 @@ Jeff Temple Oct. 19, 2012 ''' -from __future__ import print_function import sys,os,string from optparse import OptionParser diff --git a/EventFilter/SiStripRawToDigi/python/test/Validate_DigiToRawToClusters_cfg.py b/EventFilter/SiStripRawToDigi/python/test/Validate_DigiToRawToClusters_cfg.py index 57ae489eefcf2..d25e7fa387fb8 100644 --- a/EventFilter/SiStripRawToDigi/python/test/Validate_DigiToRawToClusters_cfg.py +++ b/EventFilter/SiStripRawToDigi/python/test/Validate_DigiToRawToClusters_cfg.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms Mode = str("ZS") # Options: "ZS", "VR", "PR", "FK" diff --git a/EventFilter/SiStripRawToDigi/python/test/Validate_DigiToRawToDigi_cfg.py b/EventFilter/SiStripRawToDigi/python/test/Validate_DigiToRawToDigi_cfg.py index 3cc6e0e683cd2..d96134bd04e81 100644 --- a/EventFilter/SiStripRawToDigi/python/test/Validate_DigiToRawToDigi_cfg.py +++ b/EventFilter/SiStripRawToDigi/python/test/Validate_DigiToRawToDigi_cfg.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms Mode = str("ZS") # Options: "ZS", "VR", "PR", "FK" diff --git a/JetMETCorrections/Modules/test/uploadConstants.py b/JetMETCorrections/Modules/test/uploadConstants.py index 884a270784180..9bf32bc02cf49 100644 --- a/JetMETCorrections/Modules/test/uploadConstants.py +++ b/JetMETCorrections/Modules/test/uploadConstants.py @@ -1,5 +1,4 @@ #! /usr/bin/env python -from __future__ import print_function import os import re import sys diff --git a/MagneticField/Engine/test/regression.py b/MagneticField/Engine/test/regression.py index b6c703e9f1934..54a8f1d59c299 100644 --- a/MagneticField/Engine/test/regression.py +++ b/MagneticField/Engine/test/regression.py @@ -1,5 +1,4 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet.VarParsing as VarParsing import sys diff --git a/MagneticField/Interpolation/test/BinaryTablesGeneration/convertTables.py b/MagneticField/Interpolation/test/BinaryTablesGeneration/convertTables.py index 5e8d32e09c586..027d5eb827967 100755 --- a/MagneticField/Interpolation/test/BinaryTablesGeneration/convertTables.py +++ b/MagneticField/Interpolation/test/BinaryTablesGeneration/convertTables.py @@ -1,6 +1,5 @@ #!/bin/env python -from __future__ import print_function import os # Path of the input tables diff --git a/PhysicsTools/IsolationAlgos/python/boostedElectronIsolation_cff.py b/PhysicsTools/IsolationAlgos/python/boostedElectronIsolation_cff.py index 29f9213419dfd..ef3616634400c 100644 --- a/PhysicsTools/IsolationAlgos/python/boostedElectronIsolation_cff.py +++ b/PhysicsTools/IsolationAlgos/python/boostedElectronIsolation_cff.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms from CommonTools.ParticleFlow.Isolation.pfElectronIsolation_cff import * diff --git a/PhysicsTools/IsolationAlgos/python/boostedMuonIsolation_cff.py b/PhysicsTools/IsolationAlgos/python/boostedMuonIsolation_cff.py index 46e6afee67b36..e2702ba5cec65 100644 --- a/PhysicsTools/IsolationAlgos/python/boostedMuonIsolation_cff.py +++ b/PhysicsTools/IsolationAlgos/python/boostedMuonIsolation_cff.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms from RecoMuon.MuonIsolation.muonPFIsolation_cff import * diff --git a/PhysicsTools/SelectorUtils/python/VIDSelectorBase.py b/PhysicsTools/SelectorUtils/python/VIDSelectorBase.py index ecfa4e5f29383..15b766f201153 100644 --- a/PhysicsTools/SelectorUtils/python/VIDSelectorBase.py +++ b/PhysicsTools/SelectorUtils/python/VIDSelectorBase.py @@ -1,4 +1,3 @@ -from __future__ import print_function import ROOT import string import random diff --git a/PhysicsTools/SelectorUtils/python/VIDSelectorValidator.py b/PhysicsTools/SelectorUtils/python/VIDSelectorValidator.py index 045617c66a676..931650c160add 100644 --- a/PhysicsTools/SelectorUtils/python/VIDSelectorValidator.py +++ b/PhysicsTools/SelectorUtils/python/VIDSelectorValidator.py @@ -1,4 +1,3 @@ -from __future__ import print_function import md5 import ROOT diff --git a/PhysicsTools/SelectorUtils/test/pyfwlite_test.py b/PhysicsTools/SelectorUtils/test/pyfwlite_test.py index 8549f427ab043..71e56d3065e32 100755 --- a/PhysicsTools/SelectorUtils/test/pyfwlite_test.py +++ b/PhysicsTools/SelectorUtils/test/pyfwlite_test.py @@ -1,7 +1,6 @@ #! /usr/bin/env python # import ROOT in batch mode -from __future__ import print_function import sys oldargv = sys.argv[:] sys.argv = [ '-b-' ] diff --git a/RecoBTag/CTagging/test/test_discriminator_presence.py b/RecoBTag/CTagging/test/test_discriminator_presence.py index e25fd83654749..42cad897c8b5d 100644 --- a/RecoBTag/CTagging/test/test_discriminator_presence.py +++ b/RecoBTag/CTagging/test/test_discriminator_presence.py @@ -1,4 +1,3 @@ -from __future__ import print_function import ROOT import pprint import sys diff --git a/RecoBTag/ONNXRuntime/python/pfMassIndependentDeepDoubleXJetTags_cff.py b/RecoBTag/ONNXRuntime/python/pfMassIndependentDeepDoubleXJetTags_cff.py index 7563a491a4bb0..cc7e0ac071dea 100644 --- a/RecoBTag/ONNXRuntime/python/pfMassIndependentDeepDoubleXJetTags_cff.py +++ b/RecoBTag/ONNXRuntime/python/pfMassIndependentDeepDoubleXJetTags_cff.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import FWCore.ParameterSet.Config as cms from .pfDeepDoubleBvLJetTags_cfi import pfDeepDoubleBvLJetTags from .pfDeepDoubleCvLJetTags_cfi import pfDeepDoubleCvLJetTags diff --git a/RecoBTag/ONNXRuntime/python/pfMassIndependentDeepDoubleXV2JetTags_cff.py b/RecoBTag/ONNXRuntime/python/pfMassIndependentDeepDoubleXV2JetTags_cff.py index d2082204cb5a3..3435d4f802f4c 100644 --- a/RecoBTag/ONNXRuntime/python/pfMassIndependentDeepDoubleXV2JetTags_cff.py +++ b/RecoBTag/ONNXRuntime/python/pfMassIndependentDeepDoubleXV2JetTags_cff.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import FWCore.ParameterSet.Config as cms from .pfDeepDoubleBvLJetTags_cfi import pfDeepDoubleBvLJetTags from .pfDeepDoubleCvLJetTags_cfi import pfDeepDoubleCvLJetTags diff --git a/RecoBTag/ONNXRuntime/test/plotDDX.py b/RecoBTag/ONNXRuntime/test/plotDDX.py index 4ce6ba9d8720c..1ac931dca7258 100644 --- a/RecoBTag/ONNXRuntime/test/plotDDX.py +++ b/RecoBTag/ONNXRuntime/test/plotDDX.py @@ -1,4 +1,3 @@ -from __future__ import print_function import ROOT from DataFormats.FWLite import Handle, Events import numpy as np diff --git a/RecoBTag/ONNXRuntime/test/test_deep_doubleb_cfg_AOD.py b/RecoBTag/ONNXRuntime/test/test_deep_doubleb_cfg_AOD.py index b21627033eb71..630dee6cbc9cf 100644 --- a/RecoBTag/ONNXRuntime/test/test_deep_doubleb_cfg_AOD.py +++ b/RecoBTag/ONNXRuntime/test/test_deep_doubleb_cfg_AOD.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask diff --git a/RecoBTag/PerformanceDB/test/plotPerformanceDB.py b/RecoBTag/PerformanceDB/test/plotPerformanceDB.py index 97644cf79afde..56ba02cc545e4 100644 --- a/RecoBTag/PerformanceDB/test/plotPerformanceDB.py +++ b/RecoBTag/PerformanceDB/test/plotPerformanceDB.py @@ -8,7 +8,6 @@ # #____________________________________________________________ -from __future__ import print_function from builtins import range import sys import math diff --git a/RecoEgamma/EgammaElectronProducers/test/dbs_discovery.py b/RecoEgamma/EgammaElectronProducers/test/dbs_discovery.py index 18254a1772376..14045f60114c5 100644 --- a/RecoEgamma/EgammaElectronProducers/test/dbs_discovery.py +++ b/RecoEgamma/EgammaElectronProducers/test/dbs_discovery.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -from __future__ import print_function import httplib, urllib, urllib2, types, string, os, sys # return the list of files obtained from the data discovery and based upon environnement variables: diff --git a/RecoLocalCalo/EcalRecProducers/test/compare_csv.py b/RecoLocalCalo/EcalRecProducers/test/compare_csv.py index 967833409ade7..fc788ab411b38 100644 --- a/RecoLocalCalo/EcalRecProducers/test/compare_csv.py +++ b/RecoLocalCalo/EcalRecProducers/test/compare_csv.py @@ -1,4 +1,3 @@ -from __future__ import print_function import sys def compare(fn1, fn2): diff --git a/RecoLocalCalo/HcalRecAlgos/python/RemoveAddSevLevel.py b/RecoLocalCalo/HcalRecAlgos/python/RemoveAddSevLevel.py index 5e1be9d5d4113..5fe2f1aeb94f1 100644 --- a/RecoLocalCalo/HcalRecAlgos/python/RemoveAddSevLevel.py +++ b/RecoLocalCalo/HcalRecAlgos/python/RemoveAddSevLevel.py @@ -1,5 +1,3 @@ -from __future__ import print_function -from __future__ import absolute_import import FWCore.ParameterSet.Config as cms diff --git a/RecoLocalCalo/HcalRecAlgos/test/test_RecHitReflagger_cfg.py b/RecoLocalCalo/HcalRecAlgos/test/test_RecHitReflagger_cfg.py index f721f976f94d6..e59054e7fbc70 100644 --- a/RecoLocalCalo/HcalRecAlgos/test/test_RecHitReflagger_cfg.py +++ b/RecoLocalCalo/HcalRecAlgos/test/test_RecHitReflagger_cfg.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms maxevents=10 diff --git a/RecoLocalTracker/SiStripClusterizer/test/shotTest_withReClustering_cfg.py b/RecoLocalTracker/SiStripClusterizer/test/shotTest_withReClustering_cfg.py index 4f3455655a44c..9b653e67dde62 100644 --- a/RecoLocalTracker/SiStripClusterizer/test/shotTest_withReClustering_cfg.py +++ b/RecoLocalTracker/SiStripClusterizer/test/shotTest_withReClustering_cfg.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms process = cms.Process('CALIB') diff --git a/RecoMET/METFilters/python/GenerateHcalLaserBadRunList.py b/RecoMET/METFilters/python/GenerateHcalLaserBadRunList.py index 240a783cbc538..261f154edf841 100644 --- a/RecoMET/METFilters/python/GenerateHcalLaserBadRunList.py +++ b/RecoMET/METFilters/python/GenerateHcalLaserBadRunList.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -from __future__ import print_function -from __future__ import absolute_import from builtins import range import sys, os, string import time diff --git a/RecoMET/METFilters/python/hcalLaserEventFilter_cfi.py b/RecoMET/METFilters/python/hcalLaserEventFilter_cfi.py index 24a13b64d31e4..87915a4523391 100644 --- a/RecoMET/METFilters/python/hcalLaserEventFilter_cfi.py +++ b/RecoMET/METFilters/python/hcalLaserEventFilter_cfi.py @@ -1,5 +1,3 @@ -from __future__ import print_function -from __future__ import absolute_import from RecoMET.METFilters.hcallaserevent_cfi import * # from fillDescriptions try: diff --git a/RecoMET/METFilters/test/filters_cfg.py b/RecoMET/METFilters/test/filters_cfg.py index f5d8092df8281..1b50d35a65472 100644 --- a/RecoMET/METFilters/test/filters_cfg.py +++ b/RecoMET/METFilters/test/filters_cfg.py @@ -1,4 +1,3 @@ -from __future__ import print_function ##____________________________________________________________________________|| from PhysicsTools.PatAlgos.patTemplate_cfg import * diff --git a/RecoParticleFlow/PFClusterProducer/python/particleFlowClusterECALUncorrected_cfi.py b/RecoParticleFlow/PFClusterProducer/python/particleFlowClusterECALUncorrected_cfi.py index e86856d6a048b..42e37f7aa692d 100644 --- a/RecoParticleFlow/PFClusterProducer/python/particleFlowClusterECALUncorrected_cfi.py +++ b/RecoParticleFlow/PFClusterProducer/python/particleFlowClusterECALUncorrected_cfi.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import FWCore.ParameterSet.Config as cms from .particleFlowCaloResolution_cfi import _timeResolutionECALBarrel, _timeResolutionECALEndcap diff --git a/RecoTauTag/Configuration/test/compareTauVariables.py b/RecoTauTag/Configuration/test/compareTauVariables.py index e117387df1a93..fdc4375cb855c 100644 --- a/RecoTauTag/Configuration/test/compareTauVariables.py +++ b/RecoTauTag/Configuration/test/compareTauVariables.py @@ -1,4 +1,3 @@ -from __future__ import print_function from builtins import range import sys import numpy as np diff --git a/RecoTauTag/RecoTau/python/tools/runTauIdMVA.py b/RecoTauTag/RecoTau/python/tools/runTauIdMVA.py index d3d0bdd1a3594..92a124d26c4a5 100644 --- a/RecoTauTag/RecoTau/python/tools/runTauIdMVA.py +++ b/RecoTauTag/RecoTau/python/tools/runTauIdMVA.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms from RecoTauTag.RecoTau.TauDiscriminatorTools import noPrediscriminants from RecoTauTag.RecoTau.PATTauDiscriminationByMVAIsolationRun2_cff import patDiscriminationByIsolationMVArun2v1raw, patDiscriminationByIsolationMVArun2v1 diff --git a/RecoTracker/TkSeedGenerator/python/GlobalSeedsFromTripletsWithVertices_cff.py b/RecoTracker/TkSeedGenerator/python/GlobalSeedsFromTripletsWithVertices_cff.py index c4282b6351786..4eab3c5176e92 100644 --- a/RecoTracker/TkSeedGenerator/python/GlobalSeedsFromTripletsWithVertices_cff.py +++ b/RecoTracker/TkSeedGenerator/python/GlobalSeedsFromTripletsWithVertices_cff.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms print() diff --git a/TrackPropagation/RungeKutta/test/findDiff.py b/TrackPropagation/RungeKutta/test/findDiff.py index 2d729a0d29a9c..4c4753be9e3d4 100644 --- a/TrackPropagation/RungeKutta/test/findDiff.py +++ b/TrackPropagation/RungeKutta/test/findDiff.py @@ -1,4 +1,3 @@ -from __future__ import print_function import sys if len(sys.argv) !=3 : print("usage:" + sys.argv[0] + " bla bla")