pep8, ignore W606 'async' and 'await' are reserved keywords starting with Python 3.7
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 09 Oct 2018 11:43:39 +0300
changeset 2438 0f2e5303f212
parent 2437 105c20fdeb19
child 2439 f0a040f1de1b
pep8, ignore W606 'async' and 'await' are reserved keywords starting with Python 3.7

This error exists in pyjs extension, but pyjs isn't going to Python3.
'noqa' isn't working for W606, so this warning is disabled completely.
'async' and 'await' are still checked by pylint.
tests/tools/check_source.sh
--- a/tests/tools/check_source.sh	Fri Oct 05 14:22:01 2018 +0300
+++ b/tests/tools/check_source.sh	Tue Oct 09 11:43:39 2018 +0300
@@ -120,8 +120,7 @@
     test -z $pep8 && return
 
     user_ignore=
-    # user_ignore=$user_ignore,E265  # E265 block comment should start with '# '
-    user_ignore=$user_ignore,E501  # E501 line too long (80 > 79 characters)
+    user_ignore=$user_ignore,W606  # W606 'async' and 'await' are reserved keywords starting with Python 3.7
 
     # ignored by default,
     default_ignore=
@@ -134,10 +133,11 @@
     default_ignore=$default_ignore,E242  # E242 tab after ‘,’
     default_ignore=$default_ignore,E704  # E704 multiple statements on one line (def)
     default_ignore=$default_ignore,W503  # W503 line break occurred before a binary operator
+    default_ignore=$default_ignore,W504  # W504 line break occurred after a binary operator
+    default_ignore=$default_ignore,W505  # W505 doc line too long (82 > 79 characters)
     ignore=$user_ignore,$default_ignore
 
-    # $pep8 --ignore $ignore --exclude build ./
-    $pep8 --max-line-length 300 --exclude build $py_files
+    $pep8 --max-line-length 300 --ignore=$ignore --exclude build $py_files
     if [ $? -ne 0 ]; then
         set_exit_error
     fi