From e747bb743088eb3fd4b31d583529b11f43002e9a Mon Sep 17 00:00:00 2001 From: MihaMuskinja <miha.muskinja@gmail.com> Date: Tue, 6 Oct 2020 16:39:48 +0200 Subject: [PATCH] flake8 --- .../python/ExtraParticlesConfigDb.py | 3 ++- .../ExtraParticles/python/PDGParser.py | 15 +++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Simulation/G4Extensions/ExtraParticles/python/ExtraParticlesConfigDb.py b/Simulation/G4Extensions/ExtraParticles/python/ExtraParticlesConfigDb.py index 044372cae7a..0d2b14e6591 100644 --- a/Simulation/G4Extensions/ExtraParticles/python/ExtraParticlesConfigDb.py +++ b/Simulation/G4Extensions/ExtraParticles/python/ExtraParticlesConfigDb.py @@ -1,4 +1,5 @@ # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaCommon.CfgGetter import addTool -addTool("ExtraParticles.ExtraParticlesConfig.getExtraParticlesPhysicsTool", "ExtraParticlesPhysicsTool" ) +addTool("ExtraParticles.ExtraParticlesConfig.getExtraParticlesPhysicsTool", + "ExtraParticlesPhysicsTool") diff --git a/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py b/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py index d16ef850fbc..1ea091ff8eb 100644 --- a/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py +++ b/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py @@ -131,7 +131,8 @@ class PDGParser(object): prop = 'width' else: raise ValueError( - 'Unidentified symbol %s for particle %s' % (symbol, baseName)) + 'Unidentified symbol %s for particle %s' % ( + symbol, baseName)) pdgs = splitLine[1:1+len(charges)] value = float(splitLine[1+len(charges)]) @@ -149,8 +150,14 @@ class PDGParser(object): self.extraParticles[name] = ExtraParticle(**kwargs) else: if getattr(self.extraParticles[name], prop) != -1: - self.log.warning("Property %s is already set for particle %s. Current value is %s and incoming value is %s." % ( - prop, name, getattr(self.extraParticles[name], prop), value)) + self.log.warning( + "Property %s is already" + "set for particle %s." + "Current value is %s and" + "incoming value is %s.", + prop, name, + getattr(self.extraParticles[name], prop), + value) continue setattr(self.extraParticles[name], prop, value) @@ -189,7 +196,7 @@ class PDGParser(object): def createList(self): - # make a new whitelist for GenParticleSimWhiteList (only pdgId is needed) + # make a new whitelist for GenParticleSimWhiteList with open('G4particle_whitelist_ExtraParticles.txt', 'w') as writer: for name in self.extraParticles: writer.write('%s\n' % self.extraParticles[name].pdg) -- GitLab