From 52c8bedb9ce59998708b7562d9c784b44b466c1d Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Mon, 16 May 2016 11:09:44 -0700 Subject: Updated style checking to ignore refinition errors for '@when' fxns. Updated the Scotch package to conform to PEP8 standards and to test style checking improvements. --- share/spack/qa/run-flake8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'share') 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 -- cgit v1.2.3-70-g09d2 From 761c5c845072f2079acaab886aac197798d9fd25 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Mon, 16 May 2016 12:14:57 -0700 Subject: Added line limit exemptions for 'variant' and 'version' directives. Updated the 'scotch' package to use oneline 'variant' directives. --- share/spack/qa/run-flake8 | 9 +++++++-- var/spack/repos/builtin/packages/scotch/package.py | 12 ++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'share') diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8 index 42da56222c..44eb0167fb 100755 --- a/share/spack/qa/run-flake8 +++ b/share/spack/qa/run-flake8 @@ -20,12 +20,17 @@ fi # Check if changed files are flake8 conformant [framework] 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. +# Add approved style exemptions to the changed packages. for file in $changed; do if [[ $file = *package.py ]]; then cp "$file" "$file~" + + # Exempt lines with urls and descriptions from overlong line errors. perl -i -pe 's/^(\s*url\s*=.*)$/\1 # NOQA: ignore=E501/' $file + perl -i -pe 's/^(\s*version\(.*\).*)$/\1 # NOQA: ignore=E501/' $file + perl -i -pe 's/^(\s*variant\(.*\).*)$/\1 # NOQA: ignore=E501/' $file + + # Exempt '@when' decorated functions from redefinition errors. perl -i -pe 's/^(\s*\@when\(.*\).*)$/\1 # NOQA: ignore=F811/' $file fi done diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 931e5c993a..3abbf3c665 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -40,14 +40,10 @@ class Scotch(Package): version('6.0.0', 'c50d6187462ba801f9a82133ee666e8e') version('5.1.10b', 'f587201d6cf5cf63527182fbfba70753') - variant('mpi', default=False, - description='Activate the compilation of parallel libraries') - variant('compression', default=True, - description='Activate the posibility to use compressed files') - variant('esmumps', default=False, - description='Activate the compilation of esmumps needed by mumps') - variant('shared', default=True, - description='Build a shared version of the library') + variant('mpi', default=False, description='Activate the compilation of parallel libraries') + variant('compression', default=True, description='Activate the posibility to use compressed files') + variant('esmumps', default=False, description='Activate the compilation of esmumps needed by mumps') + variant('shared', default=True, description='Build a shared version of the library') depends_on('flex') depends_on('bison') -- cgit v1.2.3-70-g09d2