diff --git a/Generators/EvgenJobTransforms/CMakeLists.txt b/Generators/EvgenJobTransforms/CMakeLists.txt index c449d97a4d61268e96dcb0c98cbcda2425353c6d..8736b66f00e777de4bf9cb00187f38ead37cc1dd 100644 --- a/Generators/EvgenJobTransforms/CMakeLists.txt +++ b/Generators/EvgenJobTransforms/CMakeLists.txt @@ -4,6 +4,6 @@ atlas_subdir( EvgenJobTransforms ) # 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_runtime( scripts/*.py ) diff --git a/Generators/EvgenJobTransforms/python/EvgenConfig.py b/Generators/EvgenJobTransforms/python/EvgenConfig.py index a68e11e6cb1ebba0c10fc92627b5bcef1e0d978f..6c86cb444857a50ebaeb9e6b132e8fdd0095a7a0 100644 --- a/Generators/EvgenJobTransforms/python/EvgenConfig.py +++ b/Generators/EvgenJobTransforms/python/EvgenConfig.py @@ -51,9 +51,9 @@ notuneGenerators = ["ParticleGenerator", "ParticleGun", "CosmicGenerator", "Beam def gen_require_steering(gennames): "Return a boolean of whether this set of generators requires the steering command line flag" - if not "EvtGen" in gennames: return False - if any(("Pythia" in gen and not "Pythia8" in gen) for gen in gennames): return True - if any(("Herwig" in gen and not "Herwigpp" in gen and not "Herwig7" in gen) for gen in gennames): return True + if "EvtGen" not in gennames: return False + if any(("Pythia" in gen and "Pythia8" not in gen) for gen in gennames): return True + if any(("Herwig" in gen and "Herwigpp" not in gen and "Herwig7" not in gen) for gen in gennames): return True return False def gen_known(genname): @@ -103,7 +103,7 @@ def gen_sortkey(genname): return (genstage, isjimmy, genname) -from PyJobTransformsCore.TransformConfig import * +from PyJobTransformsCore.TransformConfig import TransformConfig, String, ListOfStrings, Boolean, Integer, AllowedExpression, TransformConfigError class EvgenConfig(TransformConfig): __slots__ = () generators = ListOfStrings("List of used generators", allowedValues=knownGenerators) diff --git a/Generators/EvgenJobTransforms/python/jo_proxy.py b/Generators/EvgenJobTransforms/python/jo_proxy.py index fdbd2b3a75e15d39eb199e7dde8d7dcab5e8604b..d3facd14c7c685ceb9c575ffaf6fd263e9197cc7 100644 --- a/Generators/EvgenJobTransforms/python/jo_proxy.py +++ b/Generators/EvgenJobTransforms/python/jo_proxy.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 # Helper functions for setting up a job options proxy import os,shutil @@ -17,7 +17,7 @@ def mk_jo_proxy(targetbasepath, pkgname, proxypath, addtosearch=True): os.environ['LOCAL_DATA_DIR'] = (os.environ['DATAPATH']).split(":")[0] dirlist = get_immediate_subdirectories(targetbasepath) - subdirlist=dirlist; + subdirlist=dirlist for dd in (dirlist): if (('.svn' not in dd) and ('cmt' not in dd) and ('_joproxy' not in dd)): deepdir = os.path.join(targetbasepath, dd) @@ -43,4 +43,4 @@ def mk_jo_proxy(targetbasepath, pkgname, proxypath, addtosearch=True): os.environ["DATAPATH"] =os.path.join(targetbasepath, d)+":"+os.environ["DATAPATH"] os.environ["JOBOPTSEARCHPATH"] = os.environ['LOCAL_INSTALL_DIR']+":"+os.environ["JOBOPTSEARCHPATH"] - os.environ["DATAPATH"] = os.environ['LOCAL_DATA_DIR']+":"+os.environ["DATAPATH"] \ No newline at end of file + os.environ["DATAPATH"] = os.environ['LOCAL_DATA_DIR']+":"+os.environ["DATAPATH"]