diff --git a/PhysicsAnalysis/AnalysisCommon/AODSelect/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/AODSelect/CMakeLists.txt
index 24e23726258436512f0881d6f12de531057c1a52..f7b7f31d1487f66e547d46765bc62f1f17c14e7c 100644
--- a/PhysicsAnalysis/AnalysisCommon/AODSelect/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/AODSelect/CMakeLists.txt
@@ -1,12 +1,10 @@
-################################################################################
-# Package: AODSelect
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AODSelect )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 atlas_install_scripts( share/PrintAODSelect.py )
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AODSelect/python/AODSelectFlags.py b/PhysicsAnalysis/AnalysisCommon/AODSelect/python/AODSelectFlags.py
index 9d683fb4ba729c59e3cdae435196723bf876e06a..b3863c8962a6311d865c171eb923cc223ea220b4 100644
--- a/PhysicsAnalysis/AnalysisCommon/AODSelect/python/AODSelectFlags.py
+++ b/PhysicsAnalysis/AnalysisCommon/AODSelect/python/AODSelectFlags.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # =============================================================================
 # Name:        AODSelectFlags
@@ -17,7 +17,6 @@ __author__  = "Karsten Koeneke <karsten.koeneke@cern.ch>"
 
 from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
 from AthenaCommon.JobProperties import jobproperties
-from RecExConfig.RecoFunctions import AddValidItemToList,RemoveValidItemFromList
 
 # =====================================================================
 # First define container for the D2PDMaker flags  
@@ -111,19 +110,19 @@ class buildingBaseProperty(JobProperty):
     outputCollectionPrefix     = ""
     def add(self, inputItem="", createOutputCollection=None, createOutputLinkCollection=None ):
         if self.is_locked():
-            self._log.info('The JobProperty %s is blocked' % self.__name__)
+            self._log.info('The JobProperty %s is blocked', self.__name__)
         else:
             if inputItem != "":
                 if not self.inputTypeAndKeyList.__contains__(inputItem): self.inputTypeAndKeyList.append(inputItem)
-                if createOutputCollection!=None: self.createOutputCollection = createOutputCollection or self.createOutputCollection
-                if createOutputLinkCollection!=None: self.createOutputLinkCollection = createOutputLinkCollection or self.createOutputLinkCollection
+                if createOutputCollection is not None: self.createOutputCollection = createOutputCollection or self.createOutputCollection
+                if createOutputLinkCollection is not None: self.createOutputLinkCollection = createOutputLinkCollection or self.createOutputLinkCollection
                 if len(self.inputTypeAndKeyList)>0 and ( self.createOutputCollection or self.createOutputLinkCollection ):
                     self.StoredValue = True
                     AODSelectFlags.doAODSelect = True
                     pass
                 pass
             else:
-                self._log.warning('We got an empty inputItem string for the JobProperty %s... doing nothing!' % self.__name__)
+                self._log.warning('We got an empty inputItem string for the JobProperty %s... doing nothing!', self.__name__)
                 pass
             pass
         return
@@ -138,7 +137,7 @@ class flaggingBaseProperty(JobProperty):
     varNameList         = []
     def add(self, inputItem="", varNameList=[] ):
         if self.is_locked():
-            self._log.info('The JobProperty %s is blocked' % self.__name__)
+            self._log.info('The JobProperty %s is blocked', self.__name__)
         else:
             if inputItem != "":
                 self.StoredValue = True
@@ -151,7 +150,7 @@ class flaggingBaseProperty(JobProperty):
                     pass
                 pass
             else:
-                self._log.warning('We got an empty inputItem string for the JobProperty %s... doing nothing!' % self.__name__)
+                self._log.warning('We got an empty inputItem string for the JobProperty %s... doing nothing!', self.__name__)
                 pass
             pass
         return
@@ -167,25 +166,25 @@ class matchingBaseProperty(JobProperty):
     defaultMatchToItem = ""
     def add(self, inputItem="", matchToItemList=[], matchDistanceList=[] ):
         if self.is_locked():
-            self._log.info('The JobProperty %s is blocked' % self.__name__)
+            self._log.info('The JobProperty %s is blocked', self.__name__)
         else:
             if inputItem == "":
-                self._log.warning('We got an empty inputItem string for the JobProperty %s... doing nothing!' % self.__name__)
+                self._log.warning('We got an empty inputItem string for the JobProperty %s... doing nothing!', self.__name__)
                 return
             if len(matchToItemList)==0 and self.defaultMatchToItem == "" :
-                self._log.warning('We got an empty matchToItemList for the JobProperty %s... doing nothing!' % self.__name__)
+                self._log.warning('We got an empty matchToItemList for the JobProperty %s... doing nothing!', self.__name__)
                 return
             if len(matchToItemList)!=0 and len(matchDistanceList)!=0 and len(matchToItemList)!=len(matchDistanceList):
                 self._log.warning("We got non-empty lists with different lenght for the ",
-                                  "JobProperty %s... doing nothing! len(matchToItemList)=%s, len(matchDistanceList)=%s"
-                                  % (self.__name__, len(matchToItemList), len(matchDistanceList)) )
+                                  "JobProperty %s... doing nothing! len(matchToItemList)=%s, len(matchDistanceList)=%s",
+                                  self.__name__, len(matchToItemList), len(matchDistanceList) )
                 return
             # OK, we seem to have correct inputs... now, update the information
             self.StoredValue = True
             AODSelectFlags.doAODSelect = True
             # Prepare the final list of pairs of [ matchToItem, matchDistance ]
             finalMatchToItemList = []
-            for idx in xrange( len(matchToItemList) ):
+            for idx in range( len(matchToItemList) ):
                 matchToItem = matchToItemList[idx]
                 if len(matchDistanceList)==0 :
                     finalMatchToItemList.append( [matchToItem, self.defaultDeltaR] )
@@ -194,7 +193,7 @@ class matchingBaseProperty(JobProperty):
                     finalMatchToItemList.append( [matchToItem, matchDistanceList[idx]] )
                     pass
                 pass
-            if self.matchingDictionary.has_key(inputItem):
+            if inputItem in self.matchingDictionary:
                 valueList = self.matchingDictionary[inputItem]
                 for newPair in finalMatchToItemList:
                     if not valueList.__contains__(newPair):
diff --git a/PhysicsAnalysis/AnalysisCommon/AODSelect/python/AODSelectHelpers.py b/PhysicsAnalysis/AnalysisCommon/AODSelect/python/AODSelectHelpers.py
index 3fb07777b55d299ec23c62f3ec878f670d9ef991..57ccbe1ab5c0e46b39d20f57a9abeff10b8b1ecd 100644
--- a/PhysicsAnalysis/AnalysisCommon/AODSelect/python/AODSelectHelpers.py
+++ b/PhysicsAnalysis/AnalysisCommon/AODSelect/python/AODSelectHelpers.py
@@ -21,8 +21,6 @@ from AthenaCommon.Logging import logging
 logAODSelect_helpers = logging.getLogger( 'AODSelect_helpers' )
 #logAODSelect_helpers.setLevel(logging.DEBUG)
 
-# Import the AODSelectFlags to steer the job
-from AODSelect.AODSelectFlags import AODSelectFlags
 from AthenaCommon import CfgMgr
 
 # Import the objKeyStore to be able to see what collections are available
@@ -73,10 +71,10 @@ class AODSelectConfiguration(object):
         if not aodSelectFlag:
             logAODSelect_helpers.warning( "You gave me an empty flag container... this won't work!" )
             return False
-        logAODSelect_helpers.debug( "Have inputTypeAndKeyList=%s, outputCollectionPrefix=%s, createOutputCollection=%s, createOutputLinkCollection=%s, selectorTool=%s "
-                                    % (aodSelectFlag.inputTypeAndKeyList,
+        logAODSelect_helpers.debug( "Have inputTypeAndKeyList=%s, outputCollectionPrefix=%s, createOutputCollection=%s, createOutputLinkCollection=%s, selectorTool=%s ",
+                                       aodSelectFlag.inputTypeAndKeyList,
                                        aodSelectFlag.outputCollectionPrefix, aodSelectFlag.createOutputCollection,
-                                       aodSelectFlag.createOutputLinkCollection, selectorTool ) )
+                                       aodSelectFlag.createOutputLinkCollection, selectorTool )
         for inputTypeAndKey in aodSelectFlag.inputTypeAndKeyList:
             # Prepare the names for this inputTypeAndKey
             inputType, inputKey = inputTypeAndKey.split("#")
@@ -93,10 +91,10 @@ class AODSelectConfiguration(object):
                 algConfigName = inputTypeAndKey
                 if index > 0: algConfigName = algConfigName + ("_%s" % index)
                 algConfig = self.findAlgConfig(algConfigName)
-                if algConfig != None:
+                if algConfig is not None:
                     # Check if it already has output (link) collections scheduled
                     if algConfig.outputCollection == algConfig.outputLinkCollection == "":
-                        logAODSelect_helpers.debug( "Modifying an existing AODSelectAlgConfig with name: %s" % algConfigName )
+                        logAODSelect_helpers.debug( "Modifying an existing AODSelectAlgConfig with name: %s", algConfigName )
                         algConfig.selectorToolList.append(selectorTool)
                         algConfig.outputCollection     = outCollKey
                         algConfig.outputLinkCollection = outLinkCollKey
@@ -110,7 +108,7 @@ class AODSelectConfiguration(object):
                     pass
                 else:
                     # Create a new one and add it
-                    logAODSelect_helpers.debug( "Adding a new AODSelectAlgConfig with name: %s" % algConfigName )
+                    logAODSelect_helpers.debug( "Adding a new AODSelectAlgConfig with name: %s", algConfigName )
                     algConfig = AODSelectAlgConfig(algConfigName)
                     algConfig.setInputTypeAndKey(inputTypeAndKey)
                     algConfig.selectorToolList.append(selectorTool)
@@ -144,18 +142,17 @@ class AODSelectConfiguration(object):
             return False
         for inputTypeAndKey in aodSelectFlag.inputTypeAndKeyList:
             algConfig = self.findAlgConfig(inputTypeAndKey)
-            if algConfig == None:
+            if algConfig is None:
                 # Create a new one and add it
-                logAODSelect_helpers.debug( "Adding a new AODSelectAlgConfig with name: %s" % inputTypeAndKey )
+                logAODSelect_helpers.debug( "Adding a new AODSelectAlgConfig with name: %s", inputTypeAndKey )
                 algConfig = AODSelectAlgConfig(inputTypeAndKey)
-                logAODSelect_helpers.debug( "Adding a new user data tool: %s" % userDataTool )
+                logAODSelect_helpers.debug( "Adding a new user data tool: %s", userDataTool )
                 algConfig.userDataToolList.append(userDataTool)
                 if logAODSelect_helpers.isEnabledFor(logging.DEBUG): algConfig.doPrint()
                 self.addAlgConfig(algConfig)
                 pass
             else:
-                logAODSelect_helpers.debug( "Adding a new user data tool of name %s to AODSelectAlgConfig with name: %s"
-                                            % (userDataTool, inputTypeAndKey) )
+                logAODSelect_helpers.debug( "Adding a new user data tool of name %s to AODSelectAlgConfig with name: %s", userDataTool, inputTypeAndKey )
                 algConfig.userDataToolList.append(userDataTool)
                 if logAODSelect_helpers.isEnabledFor(logging.DEBUG): algConfig.doPrint()
                 pass
@@ -181,7 +178,7 @@ class AODSelectConfiguration(object):
             logAODSelect_helpers.warning( "You gave me an empty inputTypeAndKey string... this won't work!" )
             return False
         if not inputTypeAndKey.__contains__("#"):
-            logAODSelect_helpers.warning( "The inputTypeAndKey string doesn't contain a '#', but it should: %s" % inputTypeAndKey )
+            logAODSelect_helpers.warning( "The inputTypeAndKey string doesn't contain a '#', but it should: %s", inputTypeAndKey )
             return False
         if not associationTool:
             logAODSelect_helpers.warning( "You gave me an empty associationTool... this won't work!" )
@@ -189,19 +186,19 @@ class AODSelectConfiguration(object):
         # Create the name of the associationMap container that will be created
         _tmpName = ((associationTool.getName()).split("__"))[-1]
         _outAssoName = (inputTypeAndKey.split("#"))[1] + "_MatchTo_" + _tmpName
-        logAODSelect_helpers.debug( "using inputTypeAndKey=%s, _tmpName=%s, _outAssoName=%s" % (inputTypeAndKey, _tmpName, _outAssoName ) )
+        logAODSelect_helpers.debug( "using inputTypeAndKey=%s, _tmpName=%s, _outAssoName=%s", inputTypeAndKey, _tmpName, _outAssoName )
         # Find the right AODSelectAlgConfig object
         algConfig = self.findAlgConfig(inputTypeAndKey)
-        if algConfig == None:
+        if algConfig is None:
             # Create a new one and add it
-            logAODSelect_helpers.debug( "Creating a new AODSelectAlgConfig with name=%s" % (inputTypeAndKey) )
+            logAODSelect_helpers.debug( "Creating a new AODSelectAlgConfig with name=%s", inputTypeAndKey )
             algConfig = AODSelectAlgConfig(inputTypeAndKey)
             algConfig.associationToolList.append(associationTool)
             algConfig.outputAssociationList.append(_outAssoName)
             self.addAlgConfig(algConfig)
             pass
         else:
-            logAODSelect_helpers.debug( "Using an existing AODSelectAlgConfig with name=%s" % (inputTypeAndKey) )
+            logAODSelect_helpers.debug( "Using an existing AODSelectAlgConfig with name=%s", inputTypeAndKey )
             algConfig.associationToolList.append(associationTool)
             algConfig.outputAssociationList.append(_outAssoName)
             pass
@@ -235,7 +232,7 @@ class AODSelectConfiguration(object):
             logAODSelect_helpers.debug( "Values of current AODSelectAlgConfig: " )
             if logAODSelect_helpers.isEnabledFor(logging.DEBUG): algConfig.doPrint()
             algName = "AODSelect_" + algConfig.name.split("#")[1] + "_SelectionAlg"
-            logAODSelect_helpers.debug( "Now creating an algorithm with name %s" % algName )
+            logAODSelect_helpers.debug( "Now creating an algorithm with name %s", algName )
             algClass = self.algDict[algConfig.inputType]
             alg = algClass( algName,
                             inputCollection                = algConfig.inputKey,
@@ -277,38 +274,38 @@ class AODSelectAlgConfig(object):
 
 
     def setInputTypeAndKey(self, inputTypeAndKey=None, inputKey=None):
-        if inputTypeAndKey == None:
+        if inputTypeAndKey is None:
             logAODSelect_helpers.warning( "Got an empty value in setInputTypeAndKey... exiting!" )
             return
         if inputTypeAndKey.__contains__("#"):
             self.inputTypeAndKey          = inputTypeAndKey
             self.inputType, self.inputKey = inputTypeAndKey.split("#")
-            logAODSelect_helpers.debug( "Setting inputTypeAndKey=%s, inputType=%s, inputKey=%s"
-                                        % (self.inputTypeAndKey, self.inputType, self.inputKey) )
+            logAODSelect_helpers.debug( "Setting inputTypeAndKey=%s, inputType=%s, inputKey=%s",
+                                        self.inputTypeAndKey, self.inputType, self.inputKey )
             return
-        elif inputKey != None:
+        elif inputKey is not None:
             self.inputTypeAndKey = inputTypeAndKey + "#" + inputKey
             self.inputType       = inputTypeAndKey
             self.inputKey        = inputKey
-            logAODSelect_helpers.debug( "Setting inputTypeAndKey=%s, inputType=%s, inputKey=%s"
-                                        % (self.inputTypeAndKey, self.inputType, self.inputKey) )
+            logAODSelect_helpers.debug( "Setting inputTypeAndKey=%s, inputType=%s, inputKey=%s",
+                                        self.inputTypeAndKey, self.inputType, self.inputKey )
             return
-        logAODSelect_helpers.warning( "Could not understand what to do with inputTypeAndKey=%s and inputKey=%s"
-                                      % (inputTypeAndKey, inputKey) )
+        logAODSelect_helpers.warning( "Could not understand what to do with inputTypeAndKey=%s and inputKey=%s",
+                                      inputTypeAndKey, inputKey )
         return
 
 
     def doPrint(self):
-        logAODSelect_helpers.info( "Found an AODSelectAlgConfig with name = %s" % self.name )
-        logAODSelect_helpers.info( "   and inputTypeAndKey       = %s" % self.inputTypeAndKey )
-        logAODSelect_helpers.info( "   and inputType             = %s" % self.inputType )
-        logAODSelect_helpers.info( "   and inputKey              = %s" % self.inputKey )
-        logAODSelect_helpers.info( "   and outputCollection      = %s" % self.outputCollection )
-        logAODSelect_helpers.info( "   and outputLinkCollection  = %s" % self.outputLinkCollection )
-        logAODSelect_helpers.info( "   and selectorToolList      = %s" % self.selectorToolList )
-        logAODSelect_helpers.info( "   and userDataToolList      = %s" % self.userDataToolList )
-        logAODSelect_helpers.info( "   and associationToolList   = %s" % self.associationToolList )
-        logAODSelect_helpers.info( "   and outputAssociationList = %s" % self.outputAssociationList )
+        logAODSelect_helpers.info( "Found an AODSelectAlgConfig with name = %s", self.name )
+        logAODSelect_helpers.info( "   and inputTypeAndKey       = %s", self.inputTypeAndKey )
+        logAODSelect_helpers.info( "   and inputType             = %s", self.inputType )
+        logAODSelect_helpers.info( "   and inputKey              = %s", self.inputKey )
+        logAODSelect_helpers.info( "   and outputCollection      = %s", self.outputCollection )
+        logAODSelect_helpers.info( "   and outputLinkCollection  = %s", self.outputLinkCollection )
+        logAODSelect_helpers.info( "   and selectorToolList      = %s", self.selectorToolList )
+        logAODSelect_helpers.info( "   and userDataToolList      = %s", self.userDataToolList )
+        logAODSelect_helpers.info( "   and associationToolList   = %s", self.associationToolList )
+        logAODSelect_helpers.info( "   and outputAssociationList = %s", self.outputAssociationList )
         return
 
     pass
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleBuilderOptions/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/ParticleBuilderOptions/CMakeLists.txt
index 79be0526cbefa896e94eff23d2f6ee0b47d618da..04e0ca4d1a59e1e4c4dfb2cfbacbacecffd02df3 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleBuilderOptions/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleBuilderOptions/CMakeLists.txt
@@ -1,11 +1,8 @@
-################################################################################
-# Package: ParticleBuilderOptions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ParticleBuilderOptions )
 
 # Install files from the package:
-atlas_install_python_modules( python/__init__.py python/AODFlags.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
-
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleBuilderOptions/python/AODFlags.py b/PhysicsAnalysis/AnalysisCommon/ParticleBuilderOptions/python/AODFlags.py
index 7f4071058ee03af77e9d0192cbd60fd8bcba2ea1..79747bf2298ab15edd72470c26dfb49e145a8390 100755
--- a/PhysicsAnalysis/AnalysisCommon/ParticleBuilderOptions/python/AODFlags.py
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleBuilderOptions/python/AODFlags.py
@@ -21,7 +21,6 @@ __doc__="AOD Building specific flags . "
 #=======================================================================
 from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
 from AthenaCommon.JobProperties import jobproperties
-from AthenaCommon.Constants import *
 
 #=======================================================================
 # Define AOD properties by class, keeping compatibily with
@@ -257,7 +256,7 @@ class AODFlagsContainer(JobPropertyContainer):
             o=self.__dict__.get(k)
             if hasattr(o,'StoredValue'):
                 if o.statusOn and o.allowedTypes==['bool']:
-                    if o.get_Value()==True:
+                    if o.get_Value() is True:
                         print (format % (o.__name__, "ON"))
                     else:
                         print (format % (o.__name__, "--"))
diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/CMakeLists.txt
index eef90fc570c5dc895b1866925ebd16399c80f88b..6fa96ca41a5072e718fd8537d098a26d49b96ca4 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/CMakeLists.txt
@@ -1,7 +1,4 @@
-# $Id: CMakeLists.txt 795961 2017-02-07 12:53:47Z jcatmore $
-################################################################################
-# Package: ThinningUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ThinningUtils )
@@ -9,15 +6,15 @@ atlas_subdir( ThinningUtils )
 # Extra dependencies, based on the build environment:
 set( extra_libs )
 if( NOT XAOD_ANALYSIS )
-   set( extra_libs CaloEvent TrigDecisionToolLib )
+   set( extra_libs CaloEvent TrkTrack TrigDecisionToolLib )
 endif()
 
 # Component(s) in the package:
 atlas_add_component(ThinningUtils
    src/*.h src/*.cxx src/components/*.cxx
-   LINK_LIBRARIES AthLinks AthenaBaseComps AthenaKernel StoreGateLib SGtests EventInfo xAODBase
-   xAODCaloEvent xAODEgamma xAODJet xAODMuon xAODParticleEvent xAODTau
-   xAODTracking xAODTruth GaudiKernel InDetReadoutGeometry TRT_ReadoutGeometry ExpressionEvaluationLib TrkToolInterfaces MCTruthClassifierLib DerivationFrameworkInterfaces ${extra_libs})
+   LINK_LIBRARIES AthContainers AthLinks AthenaBaseComps StoreGateLib EventInfo xAODBase
+   xAODCaloEvent xAODEgamma xAODJet xAODMuon xAODParticleEvent xAODPFlow xAODTau
+   xAODTracking xAODTruth GaudiKernel InDetReadoutGeometry TRT_ReadoutGeometry ExpressionEvaluationLib MCTruthClassifierLib DerivationFrameworkInterfaces ${extra_libs})
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/python/ThinInDetForwardTrackParticles.py b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/python/ThinInDetForwardTrackParticles.py
index 299fca369b22c0ca46a137a96d84c5be3fd9e913..93d33ee337444768ef9ce29e2fd95a438459d20d 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/python/ThinInDetForwardTrackParticles.py
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/python/ThinInDetForwardTrackParticles.py
@@ -17,8 +17,7 @@ class ThinInDetForwardTrackParticles(Configured):
                                       and  any(InDetKeys.xAODForwardTrackParticleContainer() in elements
                                              for elements in inputFileSummary['eventdata_items']))
         if not have_InDetForwardParticles and ( not InDetFlags.doForwardTracks() or not InDetFlags.doParticleCreation() ) :
-            mlog.error("Not attempting to thin InDetForwardParticles, because the container %s does not seem to be available"
-                       % (InDetKeys.xAODForwardTrackParticleContainer()))
+            mlog.error("Not attempting to thin InDetForwardParticles, because the container %s does not seem to be available", InDetKeys.xAODForwardTrackParticleContainer())
             return True
 
         mlog.info('entering')
diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/python/ThinTrkTrack.py b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/python/ThinTrkTrack.py
index 670f3077cfbe68431fa0c9880dcf4b1806c7f676..1dc9bb3a58df59f6e1c1733f122c5f08b7077f99 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/python/ThinTrkTrack.py
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/python/ThinTrkTrack.py
@@ -1,10 +1,7 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-from __future__ import print_function
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from RecExConfig.Configured import Configured
 from AthenaCommon.Logging import logging
-from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
 
 class ThinTrkTrack(Configured):    
     def configure(self):
@@ -28,8 +25,6 @@ class ThinTrkTrack(Configured):
                 GSFTrackKey="GSFTracks",
                 StreamName='StreamAOD')
             
-            from AthenaCommon.Constants import VERBOSE, DEBUG, INFO, ERROR           
-            #theTrkTrackThinner.OutputLevel=DEBUG            
             print (theTrkTrackThinner)
 
         except Exception:
diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/python/TrkTrackPostExecStream.py b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/python/TrkTrackPostExecStream.py
index 2e6f2d911e1c40fbcea889cd7cc5b08cd429b774..245ec4d1ad3068c3797ea40b5486f46a0bcf21c3 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/python/TrkTrackPostExecStream.py
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/python/TrkTrackPostExecStream.py
@@ -1,8 +1,7 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from RecExConfig.Configured import Configured
 from AthenaCommon.Logging import logging
-from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
 
 class TrkTrackPostExecStream(Configured):