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.
This commit is contained in:
Joseph Ciurej
2016-05-16 11:09:44 -07:00
parent 53df9fbb4f
commit 52c8bedb9c
2 changed files with 44 additions and 31 deletions

View File

@@ -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