118 |
118 |
119 test -n $pep8 && pep8_detect |
119 test -n $pep8 && pep8_detect |
120 test -z $pep8 && return |
120 test -z $pep8 && return |
121 |
121 |
122 user_ignore= |
122 user_ignore= |
123 # user_ignore=$user_ignore,E265 # E265 block comment should start with '# ' |
123 user_ignore=$user_ignore,W606 # W606 'async' and 'await' are reserved keywords starting with Python 3.7 |
124 user_ignore=$user_ignore,E501 # E501 line too long (80 > 79 characters) |
|
125 |
124 |
126 # ignored by default, |
125 # ignored by default, |
127 default_ignore= |
126 default_ignore= |
128 default_ignore=$default_ignore,E121 # E121 continuation line under-indented for hanging indent |
127 default_ignore=$default_ignore,E121 # E121 continuation line under-indented for hanging indent |
129 default_ignore=$default_ignore,E123 # E123 closing bracket does not match indentation of opening bracket’s line |
128 default_ignore=$default_ignore,E123 # E123 closing bracket does not match indentation of opening bracket’s line |
132 default_ignore=$default_ignore,E226 # E226 missing whitespace around arithmetic operator |
131 default_ignore=$default_ignore,E226 # E226 missing whitespace around arithmetic operator |
133 default_ignore=$default_ignore,E241 # E241 multiple spaces after ':' |
132 default_ignore=$default_ignore,E241 # E241 multiple spaces after ':' |
134 default_ignore=$default_ignore,E242 # E242 tab after ‘,’ |
133 default_ignore=$default_ignore,E242 # E242 tab after ‘,’ |
135 default_ignore=$default_ignore,E704 # E704 multiple statements on one line (def) |
134 default_ignore=$default_ignore,E704 # E704 multiple statements on one line (def) |
136 default_ignore=$default_ignore,W503 # W503 line break occurred before a binary operator |
135 default_ignore=$default_ignore,W503 # W503 line break occurred before a binary operator |
|
136 default_ignore=$default_ignore,W504 # W504 line break occurred after a binary operator |
|
137 default_ignore=$default_ignore,W505 # W505 doc line too long (82 > 79 characters) |
137 ignore=$user_ignore,$default_ignore |
138 ignore=$user_ignore,$default_ignore |
138 |
139 |
139 # $pep8 --ignore $ignore --exclude build ./ |
140 $pep8 --max-line-length 300 --ignore=$ignore --exclude build $py_files |
140 $pep8 --max-line-length 300 --exclude build $py_files |
|
141 if [ $? -ne 0 ]; then |
141 if [ $? -ne 0 ]; then |
142 set_exit_error |
142 set_exit_error |
143 fi |
143 fi |
144 |
144 |
145 echo "DONE" |
145 echo "DONE" |