From 8d027ccafffd7a15c0994390a805a5577adeb979 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Fri, 22 Nov 2024 18:16:45 +0100 Subject: [PATCH] [ANALYSIS] py2/3 compatibility:drop use of __future__ --- DPGAnalysis/SiStripTools/test/MultiplicityMonitor_cfg.py | 1 - .../MuonAssociators/python/patMuonsWithTrigger_8E29_cff.py | 1 - MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_cff.py | 1 - PhysicsTools/FWLite/scripts/newFWLiteAna.py | 1 - PhysicsTools/Heppy/python/analyzers/core/Analyzer.py | 1 - PhysicsTools/Heppy/python/analyzers/core/AutoHandle.py | 1 - PhysicsTools/Heppy/python/analyzers/core/EventSelector.py | 1 - PhysicsTools/Heppy/python/analyzers/core/ProvenanceAnalyzer.py | 1 - PhysicsTools/Heppy/python/analyzers/core/SkimAnalyzerCount.py | 1 - PhysicsTools/Heppy/python/analyzers/core/TreeAnalyzerNumpy.py | 1 - PhysicsTools/Heppy/python/analyzers/core/TriggerBitAnalyzer.py | 1 - .../Heppy/python/analyzers/core/TriggerMatchAnalyzer.py | 1 - PhysicsTools/Heppy/python/analyzers/examples/MetAnalyzer.py | 1 - .../Heppy/python/analyzers/examples/SimpleTreeAnalyzer.py | 1 - PhysicsTools/Heppy/python/analyzers/examples/TriggerAnalyzer.py | 1 - PhysicsTools/Heppy/python/analyzers/examples/ZEleEleAnalyzer.py | 1 - .../Heppy/python/analyzers/examples/ZJetsTreeAnalyzer.py | 1 - PhysicsTools/Heppy/python/analyzers/examples/ZMuMuAnalyzer.py | 1 - PhysicsTools/Heppy/python/analyzers/examples/ntuple.py | 1 - PhysicsTools/Heppy/python/analyzers/gen/GeneratorAnalyzer.py | 1 - PhysicsTools/Heppy/python/analyzers/objects/IsoTrackAnalyzer.py | 1 - PhysicsTools/Heppy/python/analyzers/objects/JetAnalyzer.py | 1 - PhysicsTools/Heppy/python/analyzers/objects/LeptonAnalyzer.py | 1 - PhysicsTools/Heppy/python/analyzers/objects/PhotonAnalyzer.py | 1 - PhysicsTools/Heppy/python/analyzers/objects/VertexAnalyzer.py | 1 - PhysicsTools/Heppy/python/loadlibs.py | 1 - PhysicsTools/Heppy/python/physicsobjects/Photon.py | 1 - PhysicsTools/Heppy/python/physicsutils/BTagSF.py | 1 - PhysicsTools/Heppy/python/physicsutils/BTagWeightCalculator.py | 1 - PhysicsTools/Heppy/python/physicsutils/EnergyCorrector.py | 1 - PhysicsTools/Heppy/python/physicsutils/JetReCalibrator.py | 1 - .../Heppy/python/physicsutils/QGLikelihoodCalculator.py | 1 - PhysicsTools/Heppy/python/physicsutils/TauDecayModes.py | 1 - PhysicsTools/Heppy/python/utils/cmsswPreprocessor.py | 1 - PhysicsTools/Heppy/python/utils/miniAodFiles.py | 1 - PhysicsTools/Heppy/python/utils/rltinfo.py | 1 - PhysicsTools/Heppy/scripts/cmsBatch.py | 1 - PhysicsTools/Heppy/scripts/cmsStageWithFailover.py | 1 - PhysicsTools/Heppy/scripts/heppy_report.py | 1 - PhysicsTools/Heppy/test/crab/heppy_crab_script.py | 1 - PhysicsTools/Heppy/test/example_autofill_multipleTrees.py | 1 - PhysicsTools/Heppy/test/simple_example_cfg.py | 1 - PhysicsTools/HeppyCore/python/analyzers/CMSTestAnalyzer.py | 1 - PhysicsTools/HeppyCore/python/analyzers/Printer.py | 1 - PhysicsTools/HeppyCore/python/framework/analyzer.py | 1 - PhysicsTools/HeppyCore/python/framework/chain_test.py | 1 - PhysicsTools/HeppyCore/python/framework/config.py | 2 -- PhysicsTools/HeppyCore/python/framework/config_test.py | 1 - PhysicsTools/HeppyCore/python/framework/eventsfwlite.py | 1 - PhysicsTools/HeppyCore/python/framework/eventstfile_test.py | 1 - PhysicsTools/HeppyCore/python/framework/heppy_loop.py | 1 - PhysicsTools/HeppyCore/python/framework/looper.py | 2 -- .../HeppyCore/python/framework/services/service_test.py | 1 - PhysicsTools/HeppyCore/python/framework/weight.py | 1 - PhysicsTools/HeppyCore/python/statistics/average_test.py | 1 - PhysicsTools/HeppyCore/python/statistics/counter_test.py | 1 - PhysicsTools/HeppyCore/python/statistics/tree_test.py | 1 - PhysicsTools/HeppyCore/python/statistics/value_test.py | 1 - PhysicsTools/HeppyCore/python/utils/addToDatasets.py | 1 - PhysicsTools/HeppyCore/python/utils/batchmanager.py | 2 -- PhysicsTools/HeppyCore/python/utils/castorBaseDir.py | 2 -- PhysicsTools/HeppyCore/python/utils/das.py | 1 - PhysicsTools/HeppyCore/python/utils/dataset.py | 2 -- PhysicsTools/HeppyCore/python/utils/datasetToSource.py | 1 - PhysicsTools/HeppyCore/python/utils/dataset_test.py | 1 - PhysicsTools/HeppyCore/python/utils/diclist_test.py | 1 - PhysicsTools/HeppyCore/python/utils/edmIntegrityCheck.py | 2 -- PhysicsTools/HeppyCore/python/utils/eostools.py | 1 - PhysicsTools/HeppyCore/python/utils/logger.py | 2 -- PhysicsTools/HeppyCore/python/utils/production_tasks.py | 2 -- PhysicsTools/HeppyCore/python/utils/testtree.py | 1 - PhysicsTools/HeppyCore/scripts/edmIntegrityCheck.py | 1 - PhysicsTools/HeppyCore/scripts/heppy_batch.py | 1 - PhysicsTools/HeppyCore/scripts/heppy_check.py | 1 - PhysicsTools/HeppyCore/scripts/heppy_hadd.py | 1 - PhysicsTools/JetMCAlgos/test/testttHFGenFilter.py | 1 - PhysicsTools/PatExamples/bin/PatBasicFWLiteAnalyzer.py | 1 - PhysicsTools/PythonAnalysis/examples/MCTruth.py | 1 - PhysicsTools/PythonAnalysis/examples/MCTruth2.py | 1 - PhysicsTools/PythonAnalysis/examples/interactiveExample.py | 1 - PhysicsTools/PythonAnalysis/python/ParticleDecayDrawer.py | 1 - PhysicsTools/PythonAnalysis/python/__init__.py | 1 - PhysicsTools/PythonAnalysis/python/cmscompleter.py | 2 -- PhysicsTools/PythonAnalysis/python/cmstools.py | 2 -- PhysicsTools/PythonAnalysis/python/diffProv.py | 1 - PhysicsTools/PythonAnalysis/python/rootplot/__init__.py | 1 - PhysicsTools/PythonAnalysis/python/rootplot/core.py | 2 -- PhysicsTools/PythonAnalysis/python/rootplot/rootinfo.py | 2 -- PhysicsTools/PythonAnalysis/python/rootplot/rootmath.py | 2 -- PhysicsTools/PythonAnalysis/python/rootplot/tree2hists.py | 1 - PhysicsTools/PythonAnalysis/python/rootplot/utilities.py | 1 - PhysicsTools/PythonAnalysis/test/test.py | 1 - PhysicsTools/PythonAnalysis/test/testNumExpr.py | 1 - PhysicsTools/PythonAnalysis/test/testPandas.py | 1 - PhysicsTools/PythonAnalysis/test/testUncertainties.py | 1 - PhysicsTools/PythonAnalysis/test/testXGBoost_and_sklearn.py | 1 - PhysicsTools/TagAndProbe/test/utilities/dumpPileup.py | 1 - TopQuarkAnalysis/Configuration/test/TestForTTGenEvents.py | 1 - TopQuarkAnalysis/Configuration/test/patRefSel_muJets_cfg.py | 1 - .../TopEventProducers/python/producers/TtDecaySelection_cfi.py | 1 - .../TopEventProducers/python/sequences/ttGenEventFilters_cff.py | 1 - .../python/stringResolutions_etEtaPhi_Fall11_cff.py | 1 - .../python/stringResolutions_etEtaPhi_Spring10_cff.py | 1 - .../python/stringResolutions_etEtaPhi_Summer11_cff.py | 1 - .../python/stringResolutions_etEtaPhi_cff.py | 1 - .../TopSkimming/python/TtFullyHadronicFilter_cfi.py | 1 - .../TopSkimming/python/TtFullyLeptonicFilter_cfi.py | 1 - TopQuarkAnalysis/TopSkimming/python/TtSemiLeptonicFilter_cfi.py | 1 - 108 files changed, 121 deletions(-) diff --git a/DPGAnalysis/SiStripTools/test/MultiplicityMonitor_cfg.py b/DPGAnalysis/SiStripTools/test/MultiplicityMonitor_cfg.py index 2ad8e34df7113..c9e238daf702b 100644 --- a/DPGAnalysis/SiStripTools/test/MultiplicityMonitor_cfg.py +++ b/DPGAnalysis/SiStripTools/test/MultiplicityMonitor_cfg.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet.VarParsing as VarParsing diff --git a/MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_8E29_cff.py b/MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_8E29_cff.py index 6cb28818387f9..4486eb5646ed8 100644 --- a/MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_8E29_cff.py +++ b/MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_8E29_cff.py @@ -1,4 +1,3 @@ -from __future__ import print_function print("MuonAnalysis.MuonAssociators.patMuonsWithTrigger_8E29_cff is deprecated.\nUse use MuonAnalysis.MuonAssociators.patMuonsWithTrigger_cff instead.\n") from MuonAnalysis.MuonAssociators.patMuonsWithTrigger_cff import * diff --git a/MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_cff.py b/MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_cff.py index 6fa1cdefcb803..fad71d7c4826c 100644 --- a/MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_cff.py +++ b/MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_cff.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms ## __ __ _ ____ _ _____ __ __ diff --git a/PhysicsTools/FWLite/scripts/newFWLiteAna.py b/PhysicsTools/FWLite/scripts/newFWLiteAna.py index 3612b46d46a90..27a70553addf7 100755 --- a/PhysicsTools/FWLite/scripts/newFWLiteAna.py +++ b/PhysicsTools/FWLite/scripts/newFWLiteAna.py @@ -1,6 +1,5 @@ #! /usr/bin/env python3 -from __future__ import print_function from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter import os import sys diff --git a/PhysicsTools/Heppy/python/analyzers/core/Analyzer.py b/PhysicsTools/Heppy/python/analyzers/core/Analyzer.py index 328d884a6270a..bebaddddcdd09 100644 --- a/PhysicsTools/Heppy/python/analyzers/core/Analyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/core/Analyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function import os import logging diff --git a/PhysicsTools/Heppy/python/analyzers/core/AutoHandle.py b/PhysicsTools/Heppy/python/analyzers/core/AutoHandle.py index 02ec275ec0c19..05a5b853474cf 100644 --- a/PhysicsTools/Heppy/python/analyzers/core/AutoHandle.py +++ b/PhysicsTools/Heppy/python/analyzers/core/AutoHandle.py @@ -1,4 +1,3 @@ -from __future__ import print_function #ROOTTOOLS from DataFormats.FWLite import Events, Handle diff --git a/PhysicsTools/Heppy/python/analyzers/core/EventSelector.py b/PhysicsTools/Heppy/python/analyzers/core/EventSelector.py index 34fbece883d2e..419d1129ca044 100644 --- a/PhysicsTools/Heppy/python/analyzers/core/EventSelector.py +++ b/PhysicsTools/Heppy/python/analyzers/core/EventSelector.py @@ -1,4 +1,3 @@ -from __future__ import print_function from PhysicsTools.HeppyCore.framework.analyzer import Analyzer diff --git a/PhysicsTools/Heppy/python/analyzers/core/ProvenanceAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/core/ProvenanceAnalyzer.py index ab61f6b1bc819..68c0fd9a24a07 100644 --- a/PhysicsTools/Heppy/python/analyzers/core/ProvenanceAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/core/ProvenanceAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function from builtins import range import itertools diff --git a/PhysicsTools/Heppy/python/analyzers/core/SkimAnalyzerCount.py b/PhysicsTools/Heppy/python/analyzers/core/SkimAnalyzerCount.py index f705c51665ca8..f43b635ad72ec 100644 --- a/PhysicsTools/Heppy/python/analyzers/core/SkimAnalyzerCount.py +++ b/PhysicsTools/Heppy/python/analyzers/core/SkimAnalyzerCount.py @@ -1,4 +1,3 @@ -from __future__ import print_function import itertools from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer diff --git a/PhysicsTools/Heppy/python/analyzers/core/TreeAnalyzerNumpy.py b/PhysicsTools/Heppy/python/analyzers/core/TreeAnalyzerNumpy.py index 722044946e6c7..36318789aed17 100644 --- a/PhysicsTools/Heppy/python/analyzers/core/TreeAnalyzerNumpy.py +++ b/PhysicsTools/Heppy/python/analyzers/core/TreeAnalyzerNumpy.py @@ -1,4 +1,3 @@ -from __future__ import print_function from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer from PhysicsTools.HeppyCore.statistics.tree import Tree as Tree from ROOT import TFile diff --git a/PhysicsTools/Heppy/python/analyzers/core/TriggerBitAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/core/TriggerBitAnalyzer.py index 5cbc62e741c10..88fada3786029 100644 --- a/PhysicsTools/Heppy/python/analyzers/core/TriggerBitAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/core/TriggerBitAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function import ROOT from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer diff --git a/PhysicsTools/Heppy/python/analyzers/core/TriggerMatchAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/core/TriggerMatchAnalyzer.py index f3f79e08e08dc..3bf49c5d5bf13 100644 --- a/PhysicsTools/Heppy/python/analyzers/core/TriggerMatchAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/core/TriggerMatchAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function import ROOT from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer diff --git a/PhysicsTools/Heppy/python/analyzers/examples/MetAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/examples/MetAnalyzer.py index fece5fd6ecde2..7e6b31228e895 100644 --- a/PhysicsTools/Heppy/python/analyzers/examples/MetAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/examples/MetAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function import copy from PhysicsTools.HeppyCore.framework.analyzer import Analyzer from PhysicsTools.Heppy.analyzers.AutoHandle import AutoHandle diff --git a/PhysicsTools/Heppy/python/analyzers/examples/SimpleTreeAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/examples/SimpleTreeAnalyzer.py index 9c44cfc3eec0c..5b162eba8d200 100644 --- a/PhysicsTools/Heppy/python/analyzers/examples/SimpleTreeAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/examples/SimpleTreeAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from PhysicsTools.Heppy.analyzers.core.TreeAnalyzerNumpy import TreeAnalyzerNumpy from . import ntuple diff --git a/PhysicsTools/Heppy/python/analyzers/examples/TriggerAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/examples/TriggerAnalyzer.py index 71b9ac203379c..91d1e7b169f43 100644 --- a/PhysicsTools/Heppy/python/analyzers/examples/TriggerAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/examples/TriggerAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function from PhysicsTools.HeppyCore.framework.analyzer import Analyzer from PhysicsTools.Heppy.analyzers.AutoHandle import AutoHandle from PhysicsTools.HeppyCore.statistics.counter import Counter diff --git a/PhysicsTools/Heppy/python/analyzers/examples/ZEleEleAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/examples/ZEleEleAnalyzer.py index ba449924928f2..f4ae8bda6dece 100644 --- a/PhysicsTools/Heppy/python/analyzers/examples/ZEleEleAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/examples/ZEleEleAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function from PhysicsTools.Heppy.analyzers.DiLeptonAnalyzer import DiLeptonAnalyzer from PhysicsTools.Heppy.analyzers.AutoHandle import AutoHandle from PhysicsTools.Heppy.physicsobjects.DiObject import DiElectron diff --git a/PhysicsTools/Heppy/python/analyzers/examples/ZJetsTreeAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/examples/ZJetsTreeAnalyzer.py index e652aa3358a31..801e711dece79 100644 --- a/PhysicsTools/Heppy/python/analyzers/examples/ZJetsTreeAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/examples/ZJetsTreeAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from PhysicsTools.Heppy.analyzers.core.TreeAnalyzerNumpy import TreeAnalyzerNumpy from . import ntuple diff --git a/PhysicsTools/Heppy/python/analyzers/examples/ZMuMuAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/examples/ZMuMuAnalyzer.py index c567c63c964cd..0e32296803421 100644 --- a/PhysicsTools/Heppy/python/analyzers/examples/ZMuMuAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/examples/ZMuMuAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function from PhysicsTools.Heppy.analyzers.DiLeptonAnalyzer import DiLeptonAnalyzer from PhysicsTools.Heppy.analyzers.AutoHandle import AutoHandle from PhysicsTools.Heppy.physicsobjects.DiObject import DiMuon diff --git a/PhysicsTools/Heppy/python/analyzers/examples/ntuple.py b/PhysicsTools/Heppy/python/analyzers/examples/ntuple.py index 9b398d8717702..e28f57cdacb17 100644 --- a/PhysicsTools/Heppy/python/analyzers/examples/ntuple.py +++ b/PhysicsTools/Heppy/python/analyzers/examples/ntuple.py @@ -1,5 +1,4 @@ #!/bin/env python -from __future__ import print_function def var( tree, varName, type=float ): tree.var(varName, type) diff --git a/PhysicsTools/Heppy/python/analyzers/gen/GeneratorAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/gen/GeneratorAnalyzer.py index 64ff16a6f9798..6836a76506f33 100644 --- a/PhysicsTools/Heppy/python/analyzers/gen/GeneratorAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/gen/GeneratorAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function from builtins import range from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer from PhysicsTools.Heppy.analyzers.core.AutoHandle import AutoHandle diff --git a/PhysicsTools/Heppy/python/analyzers/objects/IsoTrackAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/objects/IsoTrackAnalyzer.py index 9aef59928ed18..f79cc7dff61b1 100755 --- a/PhysicsTools/Heppy/python/analyzers/objects/IsoTrackAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/objects/IsoTrackAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function import operator import itertools import copy diff --git a/PhysicsTools/Heppy/python/analyzers/objects/JetAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/objects/JetAnalyzer.py index ca8c82ec25554..f2e360965acd1 100644 --- a/PhysicsTools/Heppy/python/analyzers/objects/JetAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/objects/JetAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function from builtins import range import math, os from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer diff --git a/PhysicsTools/Heppy/python/analyzers/objects/LeptonAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/objects/LeptonAnalyzer.py index 5560f7eca56f2..2e4fe7e6c37d2 100644 --- a/PhysicsTools/Heppy/python/analyzers/objects/LeptonAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/objects/LeptonAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function from builtins import range from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer from PhysicsTools.Heppy.analyzers.core.AutoHandle import AutoHandle diff --git a/PhysicsTools/Heppy/python/analyzers/objects/PhotonAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/objects/PhotonAnalyzer.py index b00a7af7eb5d7..ee8691f1416e7 100644 --- a/PhysicsTools/Heppy/python/analyzers/objects/PhotonAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/objects/PhotonAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function import operator import itertools import copy diff --git a/PhysicsTools/Heppy/python/analyzers/objects/VertexAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/objects/VertexAnalyzer.py index c7dbac7ad4526..416c9ba224c8e 100644 --- a/PhysicsTools/Heppy/python/analyzers/objects/VertexAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/objects/VertexAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function import itertools from PhysicsTools.Heppy.analyzers.core.VertexHistograms import VertexHistograms diff --git a/PhysicsTools/Heppy/python/loadlibs.py b/PhysicsTools/Heppy/python/loadlibs.py index ce42f92fb3787..cf3ed186bc18e 100644 --- a/PhysicsTools/Heppy/python/loadlibs.py +++ b/PhysicsTools/Heppy/python/loadlibs.py @@ -1,4 +1,3 @@ -from __future__ import print_function from ROOT import gROOT,gSystem def load_libs(): diff --git a/PhysicsTools/Heppy/python/physicsobjects/Photon.py b/PhysicsTools/Heppy/python/physicsobjects/Photon.py index 52dedba80e524..c28d6eabf8694 100644 --- a/PhysicsTools/Heppy/python/physicsobjects/Photon.py +++ b/PhysicsTools/Heppy/python/physicsobjects/Photon.py @@ -1,4 +1,3 @@ -from __future__ import print_function from PhysicsTools.Heppy.physicsobjects.PhysicsObject import * from math import exp import re diff --git a/PhysicsTools/Heppy/python/physicsutils/BTagSF.py b/PhysicsTools/Heppy/python/physicsutils/BTagSF.py index 0ad6fb33661b1..04ffd980cde3a 100644 --- a/PhysicsTools/Heppy/python/physicsutils/BTagSF.py +++ b/PhysicsTools/Heppy/python/physicsutils/BTagSF.py @@ -1,4 +1,3 @@ -from __future__ import print_function # importing the python binding to the C++ class from ROOT from ROOT import heppy diff --git a/PhysicsTools/Heppy/python/physicsutils/BTagWeightCalculator.py b/PhysicsTools/Heppy/python/physicsutils/BTagWeightCalculator.py index cd8067ce8b494..01193fbd9b1c8 100644 --- a/PhysicsTools/Heppy/python/physicsutils/BTagWeightCalculator.py +++ b/PhysicsTools/Heppy/python/physicsutils/BTagWeightCalculator.py @@ -1,4 +1,3 @@ -from __future__ import print_function import ROOT import numpy as np diff --git a/PhysicsTools/Heppy/python/physicsutils/EnergyCorrector.py b/PhysicsTools/Heppy/python/physicsutils/EnergyCorrector.py index 932006ffbbbfc..c76ab30acbeee 100644 --- a/PhysicsTools/Heppy/python/physicsutils/EnergyCorrector.py +++ b/PhysicsTools/Heppy/python/physicsutils/EnergyCorrector.py @@ -1,4 +1,3 @@ -from __future__ import print_function from ROOT import TH1F, TH2F, TFile diff --git a/PhysicsTools/Heppy/python/physicsutils/JetReCalibrator.py b/PhysicsTools/Heppy/python/physicsutils/JetReCalibrator.py index e2bb4911af36d..3332d2520fa42 100644 --- a/PhysicsTools/Heppy/python/physicsutils/JetReCalibrator.py +++ b/PhysicsTools/Heppy/python/physicsutils/JetReCalibrator.py @@ -1,4 +1,3 @@ -from __future__ import print_function from builtins import range import ROOT import os, types diff --git a/PhysicsTools/Heppy/python/physicsutils/QGLikelihoodCalculator.py b/PhysicsTools/Heppy/python/physicsutils/QGLikelihoodCalculator.py index 3adc2fab81510..3ee615905a56a 100644 --- a/PhysicsTools/Heppy/python/physicsutils/QGLikelihoodCalculator.py +++ b/PhysicsTools/Heppy/python/physicsutils/QGLikelihoodCalculator.py @@ -1,4 +1,3 @@ -from __future__ import print_function from builtins import range import ROOT import math diff --git a/PhysicsTools/Heppy/python/physicsutils/TauDecayModes.py b/PhysicsTools/Heppy/python/physicsutils/TauDecayModes.py index a443957c4b4f6..a8f60cfc534d7 100644 --- a/PhysicsTools/Heppy/python/physicsutils/TauDecayModes.py +++ b/PhysicsTools/Heppy/python/physicsutils/TauDecayModes.py @@ -1,4 +1,3 @@ -from __future__ import print_function class TauDecayModes( object ): diff --git a/PhysicsTools/Heppy/python/utils/cmsswPreprocessor.py b/PhysicsTools/Heppy/python/utils/cmsswPreprocessor.py index 9fa4287c1c30b..7db006b2824f8 100644 --- a/PhysicsTools/Heppy/python/utils/cmsswPreprocessor.py +++ b/PhysicsTools/Heppy/python/utils/cmsswPreprocessor.py @@ -1,4 +1,3 @@ -from __future__ import print_function import os import sys import re diff --git a/PhysicsTools/Heppy/python/utils/miniAodFiles.py b/PhysicsTools/Heppy/python/utils/miniAodFiles.py index ae86ac7033dfc..c8c268da203ef 100644 --- a/PhysicsTools/Heppy/python/utils/miniAodFiles.py +++ b/PhysicsTools/Heppy/python/utils/miniAodFiles.py @@ -1,4 +1,3 @@ -from __future__ import print_function from PhysicsTools.Heppy.utils.cmsswRelease import cmsswRelease, releaseNumber def miniAodFiles(): diff --git a/PhysicsTools/Heppy/python/utils/rltinfo.py b/PhysicsTools/Heppy/python/utils/rltinfo.py index 16c0da8719806..63b689061da29 100644 --- a/PhysicsTools/Heppy/python/utils/rltinfo.py +++ b/PhysicsTools/Heppy/python/utils/rltinfo.py @@ -1,4 +1,3 @@ -from __future__ import print_function from ROOT import TFile from PhysicsTools.HeppyCore.statistics.tree import Tree as Tree diff --git a/PhysicsTools/Heppy/scripts/cmsBatch.py b/PhysicsTools/Heppy/scripts/cmsBatch.py index 5e3151ef59ec9..44d407a333921 100755 --- a/PhysicsTools/Heppy/scripts/cmsBatch.py +++ b/PhysicsTools/Heppy/scripts/cmsBatch.py @@ -2,7 +2,6 @@ # Colin # batch mode for cmsRun, March 2009 -from __future__ import print_function from builtins import range import os, sys, imp, re, pprint, string, time,shutil,copy,pickle,math from optparse import OptionParser diff --git a/PhysicsTools/Heppy/scripts/cmsStageWithFailover.py b/PhysicsTools/Heppy/scripts/cmsStageWithFailover.py index 925654979dc5d..ca40114d141ce 100755 --- a/PhysicsTools/Heppy/scripts/cmsStageWithFailover.py +++ b/PhysicsTools/Heppy/scripts/cmsStageWithFailover.py @@ -2,7 +2,6 @@ #this script runs cmsStage multiple times in the case where it failes for some reason -from __future__ import print_function from builtins import range if __name__ == '__main__': diff --git a/PhysicsTools/Heppy/scripts/heppy_report.py b/PhysicsTools/Heppy/scripts/heppy_report.py index ff63e2e5df708..9e27cd05ac080 100755 --- a/PhysicsTools/Heppy/scripts/heppy_report.py +++ b/PhysicsTools/Heppy/scripts/heppy_report.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -from __future__ import print_function from builtins import range from optparse import OptionParser import json diff --git a/PhysicsTools/Heppy/test/crab/heppy_crab_script.py b/PhysicsTools/Heppy/test/crab/heppy_crab_script.py index 906474c12894f..b57063b1ba011 100755 --- a/PhysicsTools/Heppy/test/crab/heppy_crab_script.py +++ b/PhysicsTools/Heppy/test/crab/heppy_crab_script.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -from __future__ import print_function from builtins import range import os # probably easier to fetch everything without subdirs, but that's up to user preferences diff --git a/PhysicsTools/Heppy/test/example_autofill_multipleTrees.py b/PhysicsTools/Heppy/test/example_autofill_multipleTrees.py index 64152c8e72e46..906f202f01c20 100644 --- a/PhysicsTools/Heppy/test/example_autofill_multipleTrees.py +++ b/PhysicsTools/Heppy/test/example_autofill_multipleTrees.py @@ -3,7 +3,6 @@ # In particular here we create a second tree producer containing only information and then, # cloning it in two copies, we store it both in the same file as the main tree and in separate file -from __future__ import print_function import ROOT import PhysicsTools.HeppyCore.framework.config as cfg # avoid creating subdirs, in case subdirs are wanted the treeProducer should have different names (set name="blabla" in the config) diff --git a/PhysicsTools/Heppy/test/simple_example_cfg.py b/PhysicsTools/Heppy/test/simple_example_cfg.py index be8950881f5af..45671d0d34716 100644 --- a/PhysicsTools/Heppy/test/simple_example_cfg.py +++ b/PhysicsTools/Heppy/test/simple_example_cfg.py @@ -1,4 +1,3 @@ -from __future__ import print_function import os import PhysicsTools.HeppyCore.framework.config as cfg from PhysicsTools.Heppy.utils.miniAodFiles import miniAodFiles diff --git a/PhysicsTools/HeppyCore/python/analyzers/CMSTestAnalyzer.py b/PhysicsTools/HeppyCore/python/analyzers/CMSTestAnalyzer.py index 5ee4abd954cc1..983a1a0953921 100644 --- a/PhysicsTools/HeppyCore/python/analyzers/CMSTestAnalyzer.py +++ b/PhysicsTools/HeppyCore/python/analyzers/CMSTestAnalyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function from PhysicsTools.HeppyCore.framework.analyzer import Analyzer class CMSTestAnalyzer(Analyzer): diff --git a/PhysicsTools/HeppyCore/python/analyzers/Printer.py b/PhysicsTools/HeppyCore/python/analyzers/Printer.py index 20b2fd77ef30c..32ff7951809ea 100644 --- a/PhysicsTools/HeppyCore/python/analyzers/Printer.py +++ b/PhysicsTools/HeppyCore/python/analyzers/Printer.py @@ -1,4 +1,3 @@ -from __future__ import print_function from PhysicsTools.HeppyCore.framework.analyzer import Analyzer class Printer(Analyzer): diff --git a/PhysicsTools/HeppyCore/python/framework/analyzer.py b/PhysicsTools/HeppyCore/python/framework/analyzer.py index c09eaf5936de0..ef89fefd9e322 100644 --- a/PhysicsTools/HeppyCore/python/framework/analyzer.py +++ b/PhysicsTools/HeppyCore/python/framework/analyzer.py @@ -1,4 +1,3 @@ -from __future__ import print_function # Copyright (C) 2014 Colin Bernet # https://github.com/cbernet/heppy/blob/master/LICENSE diff --git a/PhysicsTools/HeppyCore/python/framework/chain_test.py b/PhysicsTools/HeppyCore/python/framework/chain_test.py index a059a9416a4ea..cfe16eaa699c3 100644 --- a/PhysicsTools/HeppyCore/python/framework/chain_test.py +++ b/PhysicsTools/HeppyCore/python/framework/chain_test.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import unittest import os import shutil diff --git a/PhysicsTools/HeppyCore/python/framework/config.py b/PhysicsTools/HeppyCore/python/framework/config.py index a3663451cb89f..3f7259dae947a 100644 --- a/PhysicsTools/HeppyCore/python/framework/config.py +++ b/PhysicsTools/HeppyCore/python/framework/config.py @@ -1,5 +1,3 @@ -from __future__ import print_function -from __future__ import absolute_import # Copyright (C) 2014 Colin Bernet # https://github.com/cbernet/heppy/blob/master/LICENSE diff --git a/PhysicsTools/HeppyCore/python/framework/config_test.py b/PhysicsTools/HeppyCore/python/framework/config_test.py index 8d665c30acd00..ee28df920c7d4 100644 --- a/PhysicsTools/HeppyCore/python/framework/config_test.py +++ b/PhysicsTools/HeppyCore/python/framework/config_test.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import unittest import os import shutil diff --git a/PhysicsTools/HeppyCore/python/framework/eventsfwlite.py b/PhysicsTools/HeppyCore/python/framework/eventsfwlite.py index af1711609c22a..7fc79eecf6f83 100644 --- a/PhysicsTools/HeppyCore/python/framework/eventsfwlite.py +++ b/PhysicsTools/HeppyCore/python/framework/eventsfwlite.py @@ -1,4 +1,3 @@ -from __future__ import print_function from DataFormats.FWLite import Events as FWLiteEvents from ROOT import gROOT, gSystem, AutoLibraryLoader diff --git a/PhysicsTools/HeppyCore/python/framework/eventstfile_test.py b/PhysicsTools/HeppyCore/python/framework/eventstfile_test.py index fa969b5a2a2bc..cc2d7d8324535 100644 --- a/PhysicsTools/HeppyCore/python/framework/eventstfile_test.py +++ b/PhysicsTools/HeppyCore/python/framework/eventstfile_test.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import unittest from .eventstfile import Events diff --git a/PhysicsTools/HeppyCore/python/framework/heppy_loop.py b/PhysicsTools/HeppyCore/python/framework/heppy_loop.py index 4e8bceae7ce20..1d82b63711471 100755 --- a/PhysicsTools/HeppyCore/python/framework/heppy_loop.py +++ b/PhysicsTools/HeppyCore/python/framework/heppy_loop.py @@ -2,7 +2,6 @@ # Copyright (C) 2014 Colin Bernet # https://github.com/cbernet/heppy/blob/master/LICENSE -from __future__ import print_function from builtins import range import os import shutil diff --git a/PhysicsTools/HeppyCore/python/framework/looper.py b/PhysicsTools/HeppyCore/python/framework/looper.py index d8415f4c3a590..3b4969f3bb67c 100644 --- a/PhysicsTools/HeppyCore/python/framework/looper.py +++ b/PhysicsTools/HeppyCore/python/framework/looper.py @@ -1,5 +1,3 @@ -from __future__ import print_function -from __future__ import absolute_import # Copyright (C) 2014 Colin Bernet # https://github.com/cbernet/heppy/blob/master/LICENSE diff --git a/PhysicsTools/HeppyCore/python/framework/services/service_test.py b/PhysicsTools/HeppyCore/python/framework/services/service_test.py index 9c7943eb905dc..f0b5be0416f4a 100644 --- a/PhysicsTools/HeppyCore/python/framework/services/service_test.py +++ b/PhysicsTools/HeppyCore/python/framework/services/service_test.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import unittest import os import shutil diff --git a/PhysicsTools/HeppyCore/python/framework/weight.py b/PhysicsTools/HeppyCore/python/framework/weight.py index 0bf53ba308317..64c700a176b9b 100644 --- a/PhysicsTools/HeppyCore/python/framework/weight.py +++ b/PhysicsTools/HeppyCore/python/framework/weight.py @@ -1,4 +1,3 @@ -from __future__ import print_function # Copyright (C) 2014 Colin Bernet # https://github.com/cbernet/heppy/blob/master/LICENSE diff --git a/PhysicsTools/HeppyCore/python/statistics/average_test.py b/PhysicsTools/HeppyCore/python/statistics/average_test.py index 650591d67236f..d6721efced933 100644 --- a/PhysicsTools/HeppyCore/python/statistics/average_test.py +++ b/PhysicsTools/HeppyCore/python/statistics/average_test.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import unittest from .average import Average diff --git a/PhysicsTools/HeppyCore/python/statistics/counter_test.py b/PhysicsTools/HeppyCore/python/statistics/counter_test.py index d2891db92f434..05b9f64f2ab9d 100644 --- a/PhysicsTools/HeppyCore/python/statistics/counter_test.py +++ b/PhysicsTools/HeppyCore/python/statistics/counter_test.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import unittest import os import shutil diff --git a/PhysicsTools/HeppyCore/python/statistics/tree_test.py b/PhysicsTools/HeppyCore/python/statistics/tree_test.py index a6e1e69294a18..3b90a2ec1dc17 100644 --- a/PhysicsTools/HeppyCore/python/statistics/tree_test.py +++ b/PhysicsTools/HeppyCore/python/statistics/tree_test.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import unittest from ROOT import TFile from .tree import Tree diff --git a/PhysicsTools/HeppyCore/python/statistics/value_test.py b/PhysicsTools/HeppyCore/python/statistics/value_test.py index 3a78914c729ec..f3f58f3c6e96b 100644 --- a/PhysicsTools/HeppyCore/python/statistics/value_test.py +++ b/PhysicsTools/HeppyCore/python/statistics/value_test.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import unittest import math from .value import Value diff --git a/PhysicsTools/HeppyCore/python/utils/addToDatasets.py b/PhysicsTools/HeppyCore/python/utils/addToDatasets.py index 24b7d0837f293..7e725f18d5295 100644 --- a/PhysicsTools/HeppyCore/python/utils/addToDatasets.py +++ b/PhysicsTools/HeppyCore/python/utils/addToDatasets.py @@ -2,7 +2,6 @@ # Colin # additional layer, on top of cmsBatch.py -from __future__ import absolute_import import os from .castorBaseDir import getUserAndArea diff --git a/PhysicsTools/HeppyCore/python/utils/batchmanager.py b/PhysicsTools/HeppyCore/python/utils/batchmanager.py index 03dc86ff4a0fc..418984b7ada33 100644 --- a/PhysicsTools/HeppyCore/python/utils/batchmanager.py +++ b/PhysicsTools/HeppyCore/python/utils/batchmanager.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -from __future__ import print_function -from __future__ import absolute_import from datetime import datetime from optparse import OptionParser diff --git a/PhysicsTools/HeppyCore/python/utils/castorBaseDir.py b/PhysicsTools/HeppyCore/python/utils/castorBaseDir.py index cb17990a7167d..eca6c161e2a3e 100755 --- a/PhysicsTools/HeppyCore/python/utils/castorBaseDir.py +++ b/PhysicsTools/HeppyCore/python/utils/castorBaseDir.py @@ -1,6 +1,4 @@ #!/usr/bin/env python -from __future__ import print_function -from __future__ import absolute_import import os, sys from . import eostools as castortools diff --git a/PhysicsTools/HeppyCore/python/utils/das.py b/PhysicsTools/HeppyCore/python/utils/das.py index f59cb70d40a31..b963c294619ab 100644 --- a/PhysicsTools/HeppyCore/python/utils/das.py +++ b/PhysicsTools/HeppyCore/python/utils/das.py @@ -4,7 +4,6 @@ """ DAS command line tool """ -from __future__ import print_function __author__ = "Valentin Kuznetsov" import sys diff --git a/PhysicsTools/HeppyCore/python/utils/dataset.py b/PhysicsTools/HeppyCore/python/utils/dataset.py index 2fabf260cad42..317f6d1e16112 100644 --- a/PhysicsTools/HeppyCore/python/utils/dataset.py +++ b/PhysicsTools/HeppyCore/python/utils/dataset.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 -from __future__ import print_function -from __future__ import absolute_import from builtins import range import os import pprint diff --git a/PhysicsTools/HeppyCore/python/utils/datasetToSource.py b/PhysicsTools/HeppyCore/python/utils/datasetToSource.py index 4740178c0a126..923c8bc0276e6 100644 --- a/PhysicsTools/HeppyCore/python/utils/datasetToSource.py +++ b/PhysicsTools/HeppyCore/python/utils/datasetToSource.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import os from .dataset import Dataset, CMSDataset, LocalDataset, createDataset, PrivateDataset, createMyDataset diff --git a/PhysicsTools/HeppyCore/python/utils/dataset_test.py b/PhysicsTools/HeppyCore/python/utils/dataset_test.py index 1ceec0aa34ce7..5e28e1d0bbdc6 100644 --- a/PhysicsTools/HeppyCore/python/utils/dataset_test.py +++ b/PhysicsTools/HeppyCore/python/utils/dataset_test.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from builtins import range from .dataset import * diff --git a/PhysicsTools/HeppyCore/python/utils/diclist_test.py b/PhysicsTools/HeppyCore/python/utils/diclist_test.py index 2e64f03859861..f3ff4849d6180 100644 --- a/PhysicsTools/HeppyCore/python/utils/diclist_test.py +++ b/PhysicsTools/HeppyCore/python/utils/diclist_test.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import unittest from .diclist import diclist diff --git a/PhysicsTools/HeppyCore/python/utils/edmIntegrityCheck.py b/PhysicsTools/HeppyCore/python/utils/edmIntegrityCheck.py index 9f231f5497254..eb29e7ba6d96d 100644 --- a/PhysicsTools/HeppyCore/python/utils/edmIntegrityCheck.py +++ b/PhysicsTools/HeppyCore/python/utils/edmIntegrityCheck.py @@ -2,8 +2,6 @@ """ Classes to check that a set of ROOT files are OK and publish a report """ -from __future__ import print_function -from __future__ import absolute_import from builtins import range import datetime, fnmatch, json, os, shutil, sys, tempfile, time diff --git a/PhysicsTools/HeppyCore/python/utils/eostools.py b/PhysicsTools/HeppyCore/python/utils/eostools.py index dbe1e9528a905..6f93c259f5f2e 100644 --- a/PhysicsTools/HeppyCore/python/utils/eostools.py +++ b/PhysicsTools/HeppyCore/python/utils/eostools.py @@ -2,7 +2,6 @@ """ A module to manipulate files on EOS or on the local file system. Intended to have the same interface as castortools.py. """ -from __future__ import print_function import sys import os import re diff --git a/PhysicsTools/HeppyCore/python/utils/logger.py b/PhysicsTools/HeppyCore/python/utils/logger.py index f4b75ca3d2bda..dfb979ef6a5b0 100644 --- a/PhysicsTools/HeppyCore/python/utils/logger.py +++ b/PhysicsTools/HeppyCore/python/utils/logger.py @@ -1,5 +1,3 @@ -from __future__ import print_function -from __future__ import absolute_import from optparse import OptionParser import sys,os, re, subprocess, datetime diff --git a/PhysicsTools/HeppyCore/python/utils/production_tasks.py b/PhysicsTools/HeppyCore/python/utils/production_tasks.py index 1cb348fa2b92b..0a396db47c48f 100644 --- a/PhysicsTools/HeppyCore/python/utils/production_tasks.py +++ b/PhysicsTools/HeppyCore/python/utils/production_tasks.py @@ -1,5 +1,3 @@ -from __future__ import print_function -from __future__ import absolute_import from builtins import range import copy, datetime, inspect, fnmatch, os, re, subprocess, sys, tempfile, time diff --git a/PhysicsTools/HeppyCore/python/utils/testtree.py b/PhysicsTools/HeppyCore/python/utils/testtree.py index 4b4bc2164a9eb..f58d67606af4c 100644 --- a/PhysicsTools/HeppyCore/python/utils/testtree.py +++ b/PhysicsTools/HeppyCore/python/utils/testtree.py @@ -1,4 +1,3 @@ -from __future__ import print_function from builtins import range from ROOT import TFile from PhysicsTools.HeppyCore.statistics.tree import Tree diff --git a/PhysicsTools/HeppyCore/scripts/edmIntegrityCheck.py b/PhysicsTools/HeppyCore/scripts/edmIntegrityCheck.py index 28f7765cf5810..9d7c422cbd7b5 100755 --- a/PhysicsTools/HeppyCore/scripts/edmIntegrityCheck.py +++ b/PhysicsTools/HeppyCore/scripts/edmIntegrityCheck.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 -from __future__ import print_function from PhysicsTools.HeppyCore.utils.edmIntegrityCheck import PublishToFileSystem, IntegrityCheck import das diff --git a/PhysicsTools/HeppyCore/scripts/heppy_batch.py b/PhysicsTools/HeppyCore/scripts/heppy_batch.py index 93c8dc51d0fac..1c65e9c8d90ee 100755 --- a/PhysicsTools/HeppyCore/scripts/heppy_batch.py +++ b/PhysicsTools/HeppyCore/scripts/heppy_batch.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 -from __future__ import print_function from builtins import range import sys import imp diff --git a/PhysicsTools/HeppyCore/scripts/heppy_check.py b/PhysicsTools/HeppyCore/scripts/heppy_check.py index 66d4fad81a54f..6323b88ffc9f9 100755 --- a/PhysicsTools/HeppyCore/scripts/heppy_check.py +++ b/PhysicsTools/HeppyCore/scripts/heppy_check.py @@ -2,7 +2,6 @@ # Copyright (C) 2014 Colin Bernet # https://github.com/cbernet/heppy/blob/master/LICENSE -from __future__ import print_function import sys import re import os diff --git a/PhysicsTools/HeppyCore/scripts/heppy_hadd.py b/PhysicsTools/HeppyCore/scripts/heppy_hadd.py index faf2ef406f954..374a3c7658dfb 100755 --- a/PhysicsTools/HeppyCore/scripts/heppy_hadd.py +++ b/PhysicsTools/HeppyCore/scripts/heppy_hadd.py @@ -2,7 +2,6 @@ # Copyright (C) 2014 Colin Bernet # https://github.com/cbernet/heppy/blob/master/LICENSE -from __future__ import print_function import os import pprint import pickle diff --git a/PhysicsTools/JetMCAlgos/test/testttHFGenFilter.py b/PhysicsTools/JetMCAlgos/test/testttHFGenFilter.py index 10b1083d78d2d..b1ba750949bd7 100644 --- a/PhysicsTools/JetMCAlgos/test/testttHFGenFilter.py +++ b/PhysicsTools/JetMCAlgos/test/testttHFGenFilter.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask diff --git a/PhysicsTools/PatExamples/bin/PatBasicFWLiteAnalyzer.py b/PhysicsTools/PatExamples/bin/PatBasicFWLiteAnalyzer.py index ef061f19eefb1..fb34feedf6225 100644 --- a/PhysicsTools/PatExamples/bin/PatBasicFWLiteAnalyzer.py +++ b/PhysicsTools/PatExamples/bin/PatBasicFWLiteAnalyzer.py @@ -1,6 +1,5 @@ #! /usr/bin/env python -from __future__ import print_function import ROOT import sys from DataFormats.FWLite import Events, Handle diff --git a/PhysicsTools/PythonAnalysis/examples/MCTruth.py b/PhysicsTools/PythonAnalysis/examples/MCTruth.py index af829121c660b..4fed072349463 100644 --- a/PhysicsTools/PythonAnalysis/examples/MCTruth.py +++ b/PhysicsTools/PythonAnalysis/examples/MCTruth.py @@ -1,4 +1,3 @@ -from __future__ import print_function from PhysicsTools.PythonAnalysis import * import ROOT from ROOT import gSystem, TFile diff --git a/PhysicsTools/PythonAnalysis/examples/MCTruth2.py b/PhysicsTools/PythonAnalysis/examples/MCTruth2.py index bae9042e8e728..e0375b86d786d 100644 --- a/PhysicsTools/PythonAnalysis/examples/MCTruth2.py +++ b/PhysicsTools/PythonAnalysis/examples/MCTruth2.py @@ -1,4 +1,3 @@ -from __future__ import print_function from PhysicsTools.PythonAnalysis import * from ROOT import gSystem diff --git a/PhysicsTools/PythonAnalysis/examples/interactiveExample.py b/PhysicsTools/PythonAnalysis/examples/interactiveExample.py index 39bcc5bdee722..add902a27ba45 100644 --- a/PhysicsTools/PythonAnalysis/examples/interactiveExample.py +++ b/PhysicsTools/PythonAnalysis/examples/interactiveExample.py @@ -1,4 +1,3 @@ -from __future__ import print_function # has to be called with python -i interactiveExample.py from PhysicsTools.PythonAnalysis import * diff --git a/PhysicsTools/PythonAnalysis/python/ParticleDecayDrawer.py b/PhysicsTools/PythonAnalysis/python/ParticleDecayDrawer.py index b49343b06757f..e21e50d92ea40 100644 --- a/PhysicsTools/PythonAnalysis/python/ParticleDecayDrawer.py +++ b/PhysicsTools/PythonAnalysis/python/ParticleDecayDrawer.py @@ -1,4 +1,3 @@ -from __future__ import print_function # Benedikt Hegner, DESY # benedikt.hegner@cern.ch # diff --git a/PhysicsTools/PythonAnalysis/python/__init__.py b/PhysicsTools/PythonAnalysis/python/__init__.py index 7b123ce45734f..2d9ee47e3025f 100644 --- a/PhysicsTools/PythonAnalysis/python/__init__.py +++ b/PhysicsTools/PythonAnalysis/python/__init__.py @@ -1,2 +1 @@ -from __future__ import absolute_import from .cmstools import * diff --git a/PhysicsTools/PythonAnalysis/python/cmscompleter.py b/PhysicsTools/PythonAnalysis/python/cmscompleter.py index 2b6a111d850a6..6577b0a88cbfe 100644 --- a/PhysicsTools/PythonAnalysis/python/cmscompleter.py +++ b/PhysicsTools/PythonAnalysis/python/cmscompleter.py @@ -5,8 +5,6 @@ benedikt.hegner@cern.ch """ -from __future__ import absolute_import -from __future__ import print_function # TODO: sometimes results are doubled. clean global_matches list! import readline diff --git a/PhysicsTools/PythonAnalysis/python/cmstools.py b/PhysicsTools/PythonAnalysis/python/cmstools.py index f37da3a0925b6..4bba8004cf710 100644 --- a/PhysicsTools/PythonAnalysis/python/cmstools.py +++ b/PhysicsTools/PythonAnalysis/python/cmstools.py @@ -3,8 +3,6 @@ benedikt.hegner@cern.ch """ -from __future__ import absolute_import -from __future__ import print_function from builtins import range import re import ROOT diff --git a/PhysicsTools/PythonAnalysis/python/diffProv.py b/PhysicsTools/PythonAnalysis/python/diffProv.py index 582544bc2dec6..aa9ff3fbad085 100644 --- a/PhysicsTools/PythonAnalysis/python/diffProv.py +++ b/PhysicsTools/PythonAnalysis/python/diffProv.py @@ -1,4 +1,3 @@ -from __future__ import print_function from builtins import range class difference : diff --git a/PhysicsTools/PythonAnalysis/python/rootplot/__init__.py b/PhysicsTools/PythonAnalysis/python/rootplot/__init__.py index a061c6fa2f0c2..2bf53e0b795c6 100644 --- a/PhysicsTools/PythonAnalysis/python/rootplot/__init__.py +++ b/PhysicsTools/PythonAnalysis/python/rootplot/__init__.py @@ -1,3 +1,2 @@ -from __future__ import absolute_import from .core import rootplot, rootplotmpl, plot, plotmpl from .version import __version__ diff --git a/PhysicsTools/PythonAnalysis/python/rootplot/core.py b/PhysicsTools/PythonAnalysis/python/rootplot/core.py index 483f5865d6a63..6a91cbf687c11 100644 --- a/PhysicsTools/PythonAnalysis/python/rootplot/core.py +++ b/PhysicsTools/PythonAnalysis/python/rootplot/core.py @@ -1,8 +1,6 @@ """ An API and a CLI for quickly building complex figures. """ -from __future__ import absolute_import -from __future__ import print_function from builtins import range __license__ = '''\ diff --git a/PhysicsTools/PythonAnalysis/python/rootplot/rootinfo.py b/PhysicsTools/PythonAnalysis/python/rootplot/rootinfo.py index 12483ff6fbffd..c56528d3148be 100644 --- a/PhysicsTools/PythonAnalysis/python/rootplot/rootinfo.py +++ b/PhysicsTools/PythonAnalysis/python/rootplot/rootinfo.py @@ -1,8 +1,6 @@ """ Print information about objects in a ROOT file. """ -from __future__ import absolute_import -from __future__ import print_function from builtins import range from .version import __version__ diff --git a/PhysicsTools/PythonAnalysis/python/rootplot/rootmath.py b/PhysicsTools/PythonAnalysis/python/rootplot/rootmath.py index 80fdb4b1265f9..09c1ba694356b 100644 --- a/PhysicsTools/PythonAnalysis/python/rootplot/rootmath.py +++ b/PhysicsTools/PythonAnalysis/python/rootplot/rootmath.py @@ -1,8 +1,6 @@ """ rootmath description """ -from __future__ import absolute_import -from __future__ import print_function from builtins import range __license__ = '''\ diff --git a/PhysicsTools/PythonAnalysis/python/rootplot/tree2hists.py b/PhysicsTools/PythonAnalysis/python/rootplot/tree2hists.py index d6cf8bed637f0..b66fba285a488 100644 --- a/PhysicsTools/PythonAnalysis/python/rootplot/tree2hists.py +++ b/PhysicsTools/PythonAnalysis/python/rootplot/tree2hists.py @@ -4,7 +4,6 @@ Options are specified in the given configuration file. """ -from __future__ import print_function # Create configuration file: # tree2hists.py diff --git a/PhysicsTools/PythonAnalysis/python/rootplot/utilities.py b/PhysicsTools/PythonAnalysis/python/rootplot/utilities.py index 6ba4368b11930..bfa6021f16da9 100644 --- a/PhysicsTools/PythonAnalysis/python/rootplot/utilities.py +++ b/PhysicsTools/PythonAnalysis/python/rootplot/utilities.py @@ -1,7 +1,6 @@ """ Utilities for rootplot including histogram classes. """ -from __future__ import print_function from builtins import range __license__ = '''\ diff --git a/PhysicsTools/PythonAnalysis/test/test.py b/PhysicsTools/PythonAnalysis/test/test.py index 27e742816d541..6196f59c2b9db 100755 --- a/PhysicsTools/PythonAnalysis/test/test.py +++ b/PhysicsTools/PythonAnalysis/test/test.py @@ -1,4 +1,3 @@ -from __future__ import print_function from readProv import * from diffProv import * import unittest diff --git a/PhysicsTools/PythonAnalysis/test/testNumExpr.py b/PhysicsTools/PythonAnalysis/test/testNumExpr.py index f68854063d670..9008bc2cdbd1d 100755 --- a/PhysicsTools/PythonAnalysis/test/testNumExpr.py +++ b/PhysicsTools/PythonAnalysis/test/testNumExpr.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 #https://github.com/pydata/numexpr/wiki/Numexpr-Users-Guide -from __future__ import print_function import numpy as np import numexpr as ne a = np.arange(10) diff --git a/PhysicsTools/PythonAnalysis/test/testPandas.py b/PhysicsTools/PythonAnalysis/test/testPandas.py index 49e7b0a40fb56..2c7943342542b 100755 --- a/PhysicsTools/PythonAnalysis/test/testPandas.py +++ b/PhysicsTools/PythonAnalysis/test/testPandas.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 -from __future__ import print_function import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as pyplot diff --git a/PhysicsTools/PythonAnalysis/test/testUncertainties.py b/PhysicsTools/PythonAnalysis/test/testUncertainties.py index ccd510bc7c22b..c4d41e60f0632 100755 --- a/PhysicsTools/PythonAnalysis/test/testUncertainties.py +++ b/PhysicsTools/PythonAnalysis/test/testUncertainties.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 #example taken from https://pypi.python.org/pypi/uncertainties/3.0.1 -from __future__ import print_function from uncertainties import ufloat x = ufloat(2, 0.25) print(x) diff --git a/PhysicsTools/PythonAnalysis/test/testXGBoost_and_sklearn.py b/PhysicsTools/PythonAnalysis/test/testXGBoost_and_sklearn.py index d4d14dbf0d170..4ccbce069e4c1 100755 --- a/PhysicsTools/PythonAnalysis/test/testXGBoost_and_sklearn.py +++ b/PhysicsTools/PythonAnalysis/test/testXGBoost_and_sklearn.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 # from https://gist.github.com/IevaZarina/ef63197e089169a9ea9f3109058a9679 -from __future__ import print_function import numpy as np import xgboost as xgb from sklearn import datasets diff --git a/PhysicsTools/TagAndProbe/test/utilities/dumpPileup.py b/PhysicsTools/TagAndProbe/test/utilities/dumpPileup.py index c545c9d6b1d17..99a60e0400b27 100644 --- a/PhysicsTools/TagAndProbe/test/utilities/dumpPileup.py +++ b/PhysicsTools/TagAndProbe/test/utilities/dumpPileup.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -from __future__ import print_function from builtins import range import sys import ROOT diff --git a/TopQuarkAnalysis/Configuration/test/TestForTTGenEvents.py b/TopQuarkAnalysis/Configuration/test/TestForTTGenEvents.py index ed2c3344d6c7f..4a720b120ed3b 100644 --- a/TopQuarkAnalysis/Configuration/test/TestForTTGenEvents.py +++ b/TopQuarkAnalysis/Configuration/test/TestForTTGenEvents.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet.VarParsing as VarParsing import sys diff --git a/TopQuarkAnalysis/Configuration/test/patRefSel_muJets_cfg.py b/TopQuarkAnalysis/Configuration/test/patRefSel_muJets_cfg.py index 7ad4d5c8dcc66..a0bf9c6f1507d 100644 --- a/TopQuarkAnalysis/Configuration/test/patRefSel_muJets_cfg.py +++ b/TopQuarkAnalysis/Configuration/test/patRefSel_muJets_cfg.py @@ -1,4 +1,3 @@ -from __future__ import print_function # As of 1 Feb 2017: # This configuration appears to be already broken in more # than one way. It fails to even run only under python. diff --git a/TopQuarkAnalysis/TopEventProducers/python/producers/TtDecaySelection_cfi.py b/TopQuarkAnalysis/TopEventProducers/python/producers/TtDecaySelection_cfi.py index 315384c3e4f22..50a6cfbb13f26 100644 --- a/TopQuarkAnalysis/TopEventProducers/python/producers/TtDecaySelection_cfi.py +++ b/TopQuarkAnalysis/TopEventProducers/python/producers/TtDecaySelection_cfi.py @@ -1,4 +1,3 @@ -from __future__ import print_function print("*** Warning: TopQuarkAnalysis/TopEventProducers/python/producers/TtDecaySelection_cfi.py will be deprecated") print("*** Please use TopQuarkAnalysis/TopSkimming/python/TtDecayChannelFilter_cfi.py instead") print("*** (you can still use 'genEvent' instead of 'genParticles' as input)") diff --git a/TopQuarkAnalysis/TopEventProducers/python/sequences/ttGenEventFilters_cff.py b/TopQuarkAnalysis/TopEventProducers/python/sequences/ttGenEventFilters_cff.py index 499c6d05f2a16..c99e766a735aa 100644 --- a/TopQuarkAnalysis/TopEventProducers/python/sequences/ttGenEventFilters_cff.py +++ b/TopQuarkAnalysis/TopEventProducers/python/sequences/ttGenEventFilters_cff.py @@ -1,4 +1,3 @@ -from __future__ import print_function print("*** Warning: TopQuarkAnalysis/TopEventProducers/python/sequences/ttGenEventFilters_cff.py will be deprecated") print("*** Please use TopQuarkAnalysis/TopSkimming/python/ttDecayChannelFilters_cff.py instead") print("*** (you can still use 'genEvent' instead of 'genParticles' as input)") diff --git a/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_Fall11_cff.py b/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_Fall11_cff.py index 53f9b988a175c..ae23282ea5363 100644 --- a/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_Fall11_cff.py +++ b/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_Fall11_cff.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms from PhysicsTools.PatAlgos.recoLayer0.stringResolutionProvider_cfi import * diff --git a/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_Spring10_cff.py b/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_Spring10_cff.py index 4917d9e82236c..47d6e76a3fcea 100644 --- a/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_Spring10_cff.py +++ b/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_Spring10_cff.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms from PhysicsTools.PatAlgos.recoLayer0.stringResolutionProvider_cfi import * diff --git a/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_Summer11_cff.py b/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_Summer11_cff.py index 02309a27632d7..342068ee2e540 100644 --- a/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_Summer11_cff.py +++ b/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_Summer11_cff.py @@ -1,4 +1,3 @@ -from __future__ import print_function import FWCore.ParameterSet.Config as cms from PhysicsTools.PatAlgos.recoLayer0.stringResolutionProvider_cfi import * diff --git a/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_cff.py b/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_cff.py index 96b69ade57795..3a54a449d5d3b 100644 --- a/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_cff.py +++ b/TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_cff.py @@ -1,4 +1,3 @@ -from __future__ import print_function print("*** WARNING: The file TopQuarkAnalysis/TopObjectResolutions/python/stringResolutions_etEtaPhi_cff.py is outdated.") print("*** Please migrate to a more recent one (possibly found in the same directory).") diff --git a/TopQuarkAnalysis/TopSkimming/python/TtFullyHadronicFilter_cfi.py b/TopQuarkAnalysis/TopSkimming/python/TtFullyHadronicFilter_cfi.py index e63af98dfd1e5..e547e3c67344a 100644 --- a/TopQuarkAnalysis/TopSkimming/python/TtFullyHadronicFilter_cfi.py +++ b/TopQuarkAnalysis/TopSkimming/python/TtFullyHadronicFilter_cfi.py @@ -1,4 +1,3 @@ -from __future__ import print_function print("*** Warning: TopQuarkAnalysis/TopSkimming/python/TtFullyHadronicFilter_cfi.py will be deprecated") print("*** Please use TopQuarkAnalysis/TopSkimming/python/TtDecayChannelFilter_cfi.py or") print("*** TopQuarkAnalysis/TopSkimming/python/ttDecayChannelFilter_cff.py instead") diff --git a/TopQuarkAnalysis/TopSkimming/python/TtFullyLeptonicFilter_cfi.py b/TopQuarkAnalysis/TopSkimming/python/TtFullyLeptonicFilter_cfi.py index 5f01118cffeed..6cdba727f0203 100644 --- a/TopQuarkAnalysis/TopSkimming/python/TtFullyLeptonicFilter_cfi.py +++ b/TopQuarkAnalysis/TopSkimming/python/TtFullyLeptonicFilter_cfi.py @@ -1,4 +1,3 @@ -from __future__ import print_function print("*** Warning: TopQuarkAnalysis/TopSkimming/python/TtFullyLeptonicFilter_cfi.py will be deprecated") print("*** Please use TopQuarkAnalysis/TopSkimming/python/TtDecayChannelFilter_cfi.py or") print("*** TopQuarkAnalysis/TopSkimming/python/ttDecayChannelFilter_cff.py instead") diff --git a/TopQuarkAnalysis/TopSkimming/python/TtSemiLeptonicFilter_cfi.py b/TopQuarkAnalysis/TopSkimming/python/TtSemiLeptonicFilter_cfi.py index 5cef56ed3048f..34261dd65eaf6 100644 --- a/TopQuarkAnalysis/TopSkimming/python/TtSemiLeptonicFilter_cfi.py +++ b/TopQuarkAnalysis/TopSkimming/python/TtSemiLeptonicFilter_cfi.py @@ -1,4 +1,3 @@ -from __future__ import print_function print("*** Warning: TopQuarkAnalysis/TopSkimming/python/TtSemiLeptonicFilter_cfi.py will be deprecated") print("*** Please use TopQuarkAnalysis/TopSkimming/python/TtDecayChannelFilter_cfi.py or") print("*** TopQuarkAnalysis/TopSkimming/python/ttDecayChannelFilter_cff.py instead")