diff options
Diffstat (limited to 'share')
-rwxr-xr-x | share/spack/qa/run-flake8 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8 index 722c7fcba6..42da56222c 100755 --- a/share/spack/qa/run-flake8 +++ b/share/spack/qa/run-flake8 @@ -21,9 +21,12 @@ fi changed=$(git diff --name-only develop... | grep '.py$') # Exempt url lines in changed packages from overlong line errors. +# Exempt functions defined with '@when' decorator from redefinition errors. for file in $changed; do if [[ $file = *package.py ]]; then - perl -i~ -pe 's/^(\s*url\s*=.*)$/\1 # NOQA: ignore=E501/' $file; + cp "$file" "$file~" + perl -i -pe 's/^(\s*url\s*=.*)$/\1 # NOQA: ignore=E501/' $file + perl -i -pe 's/^(\s*\@when\(.*\).*)$/\1 # NOQA: ignore=F811/' $file fi done |