Added line limit exemptions for 'variant' and 'version' directives.
Updated the 'scotch' package to use oneline 'variant' directives.
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user