From 0eeafe357f50be7ac2a8f5db0f99684b1c7e5b7f Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Mon, 28 Oct 2019 14:35:46 +0100 Subject: [PATCH] AthenaConfiguration: Enable flake8 build check and make python code compliant Remove the flake8 unit test as this is now handled by the build-time check. --- Control/AthenaConfiguration/CMakeLists.txt | 10 ++-------- Control/AthenaConfiguration/python/TestDefaults.py | 3 ++- .../python/iconfTool/utils/serialization.py | 1 + 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Control/AthenaConfiguration/CMakeLists.txt b/Control/AthenaConfiguration/CMakeLists.txt index 97c7eda7998..dd098c46332 100644 --- a/Control/AthenaConfiguration/CMakeLists.txt +++ b/Control/AthenaConfiguration/CMakeLists.txt @@ -9,7 +9,8 @@ atlas_subdir( AthenaConfiguration ) find_package( six ) # Install files from the package: -atlas_install_python_modules( python/*.py python/iconfTool ) +atlas_install_python_modules( python/*.py python/iconfTool + POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_scripts( share/confTool.py python/iconfTool/iconfTool ) atlas_install_data( share/*.ref ) @@ -43,13 +44,6 @@ if( NOT "${CMAKE_PROJECT_NAME}" STREQUAL "AthSimulation" ) POST_EXEC_SCRIPT nopost.sh ) endif() - -# Check python syntax: -atlas_add_test( flake8 - SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/python - POST_EXEC_SCRIPT nopost.sh ) - - # Test AppendToGlobal atlas_add_test( appendToGlobalTest SCRIPT athena.py testAppendToGlobals.py diff --git a/Control/AthenaConfiguration/python/TestDefaults.py b/Control/AthenaConfiguration/python/TestDefaults.py index dc9611b3bb3..462ee296e5f 100644 --- a/Control/AthenaConfiguration/python/TestDefaults.py +++ b/Control/AthenaConfiguration/python/TestDefaults.py @@ -1,4 +1,5 @@ -#Files for use in configuration unit tests +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Files for use in configuration unit tests from __future__ import print_function diff --git a/Control/AthenaConfiguration/python/iconfTool/utils/serialization.py b/Control/AthenaConfiguration/python/iconfTool/utils/serialization.py index 7728e8fd752..f0e762c5821 100644 --- a/Control/AthenaConfiguration/python/iconfTool/utils/serialization.py +++ b/Control/AthenaConfiguration/python/iconfTool/utils/serialization.py @@ -1,3 +1,4 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration import pickle -- GitLab