From ea73efd4adbf467b6e0503a792c2c84fa9939bc9 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Tue, 22 Feb 2022 15:29:17 +0100 Subject: [PATCH] flake8: cleanup error code selection - Remove obsolete ATL238 (Py2to3 migration). - Move ATL902 from `--enable-extensions` to `--select`, which has the same effect (flake8 always gives priority to the most specific error code from the select/ignore lists). --- .devcontainer/devcontainer.json | 5 ++--- .vscode/settings.json | 5 ++--- Projects/AthGeneration/CMakeLists.txt | 7 +++---- Projects/AthSimulation/CMakeLists.txt | 7 +++---- Projects/Athena/CMakeLists.txt | 7 +++---- 5 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3834d038d1b1..8ca1df32170a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,9 +18,8 @@ "python.linting.pylintEnabled": false, "python.linting.flake8Enabled": true, "python.linting.flake8Args": [ - "--select=ATL,F,E101,E7,E9,W6", - "--ignore=ATL238,ATL9,E701,E702,E704,E741", - "--enable-extensions=ATL902" + "--select=ATL,ATL902,F,E101,E7,E9,W6", + "--ignore=ATL9,E701,E702,E704,E741" ] }, diff --git a/.vscode/settings.json b/.vscode/settings.json index 27b9095cf60a..398fe985655b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,8 +13,7 @@ "python.linting.flake8Enabled": true, "python.linting.flake8Path": "${workspaceFolder}/../build/ide_flake8", "python.linting.flake8Args": [ - "--select=ATL,F,E101,E7,E9,W6", - "--ignore=ATL238,ATL9,E701,E702,E704,E741", - "--enable-extensions=ATL902" + "--select=ATL,ATL902,F,E101,E7,E9,W6", + "--ignore=ATL9,E701,E702,E704,E741" ] } diff --git a/Projects/AthGeneration/CMakeLists.txt b/Projects/AthGeneration/CMakeLists.txt index 1c87b1b6057a..2cf0050fc443 100644 --- a/Projects/AthGeneration/CMakeLists.txt +++ b/Projects/AthGeneration/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration # Set up the project. cmake_minimum_required( VERSION 3.6 ) @@ -8,9 +8,8 @@ project( AthGeneration VERSION ${_version} LANGUAGES C CXX Fortran ) unset( _version ) # Configure flake8: -set( ATLAS_FLAKE8 flake8_atlas --select ATL,F,E101,E7,E9,W6 - --ignore ATL238,ATL9,E701,E702,E704,E741 - --enable-extensions ATL902 +set( ATLAS_FLAKE8 flake8_atlas --select ATL,ATL902,F,E101,E7,E9,W6 + --ignore ATL9,E701,E702,E704,E741 CACHE STRING "Default flake8 command" ) set( ATLAS_PYTHON_CHECKER ${ATLAS_FLAKE8} CACHE STRING "Python checker command to run during Python module compilation" ) diff --git a/Projects/AthSimulation/CMakeLists.txt b/Projects/AthSimulation/CMakeLists.txt index 407783f88a8c..a265c3b1f1da 100644 --- a/Projects/AthSimulation/CMakeLists.txt +++ b/Projects/AthSimulation/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration # Set up the project. cmake_minimum_required( VERSION 3.6 ) @@ -8,9 +8,8 @@ project( AthSimulation VERSION ${_version} LANGUAGES C CXX Fortran ) unset( _version ) # Configure flake8: -set( ATLAS_FLAKE8 flake8_atlas --select ATL,F,E101,E7,E9,W6 - --ignore ATL238,ATL9,E701,E702,E704,E741 - --enable-extensions ATL902 +set( ATLAS_FLAKE8 flake8_atlas --select ATL,ATL902,F,E101,E7,E9,W6 + --ignore ATL9,E701,E702,E704,E741 CACHE STRING "Default flake8 command" ) set( ATLAS_PYTHON_CHECKER ${ATLAS_FLAKE8} CACHE STRING "Python checker command to run during Python module compilation" ) diff --git a/Projects/Athena/CMakeLists.txt b/Projects/Athena/CMakeLists.txt index 0cef1a0fc7c2..da8964d76cb9 100644 --- a/Projects/Athena/CMakeLists.txt +++ b/Projects/Athena/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration # Set up the project. cmake_minimum_required( VERSION 3.10 ) @@ -53,9 +53,8 @@ mark_as_advanced( TDAQ-COMMON_ATROOT TDAQ_PROJECT_NAME TDAQ_ATROOT ) # Configure flake8: -set( ATLAS_FLAKE8 flake8_atlas --select ATL,F,E101,E7,E9,W6 - --ignore ATL238,ATL9,E701,E702,E704,E741 - --enable-extensions ATL902 +set( ATLAS_FLAKE8 flake8_atlas --select ATL,ATL902,F,E101,E7,E9,W6 + --ignore ATL9,E701,E702,E704,E741 CACHE STRING "Default flake8 command" ) set( ATLAS_PYTHON_CHECKER ${ATLAS_FLAKE8} CACHE STRING "Python checker command to run during Python module compilation" ) -- GitLab