Ignore bad-whitespace, but only for keyword argument assignment.
Old versions of pylint don't properly handle typed keyword args, which PEP mandates should have a space between the type and the assignment for the default value. Also ignore invalid-sequence-index errors, which misfire on the parameterization of Dict with str keys. Presumably any real invalid sequence indexing should be caught by trivial unit tests. PiperOrigin-RevId: 332136188 Change-Id: I8edc23f061dccc18d68afe246aa71d5f98d61cd0
This commit is contained in:
parent
a0d6054121
commit
d9ae2b7592
@ -114,7 +114,8 @@ do_pylint() {
|
||||
"^tensorflow/python/kernel_tests/constant_op_eager_test.py.*\[E0303.*invalid-length-returned "\
|
||||
"^tensorflow/python/keras/utils/data_utils.py.*\[E1102.*not-callable "\
|
||||
"^tensorflow/python/autograph/.*_py3_test\.py.*\[E0001.*syntax-error "\
|
||||
"^tensorflow/python/keras/preprocessing/image\.py.*\[E0240.*Inconsistent method resolution "
|
||||
"^tensorflow/python/keras/preprocessing/image\.py.*\[E0240.*Inconsistent method resolution "\
|
||||
"^tensorflow/\.py.*\[C0326.*bad-whitespace.*No space allowed around keyword argument assignment "
|
||||
|
||||
echo "ERROR_ALLOWLIST=\"${ERROR_ALLOWLIST}\""
|
||||
|
||||
@ -215,7 +216,7 @@ do_pylint() {
|
||||
IS_ALLOWLISTED=0
|
||||
for WL_REGEX in ${ERROR_ALLOWLIST}; do
|
||||
if echo ${LINE} | grep -q "${WL_REGEX}"; then
|
||||
echo "Found a allowlisted error:"
|
||||
echo "Found an allowlisted error:"
|
||||
echo " ${LINE}"
|
||||
IS_ALLOWLISTED=1
|
||||
fi
|
||||
|
@ -38,7 +38,7 @@ enable=indexing-exception,old-raise-syntax
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
||||
# --disable=W"
|
||||
disable=design,similarities,no-self-use,attribute-defined-outside-init,locally-disabled,star-args,pointless-except,bad-option-value,global-statement,fixme,suppressed-message,useless-suppression,locally-enabled,no-member,no-name-in-module,import-error,unsubscriptable-object,unbalanced-tuple-unpacking,undefined-variable,not-context-manager
|
||||
disable=design,similarities,no-self-use,attribute-defined-outside-init,locally-disabled,star-args,pointless-except,bad-option-value,global-statement,fixme,suppressed-message,useless-suppression,locally-enabled,no-member,no-name-in-module,import-error,unsubscriptable-object,unbalanced-tuple-unpacking,undefined-variable,not-context-manager,invalid-sequence-index
|
||||
|
||||
|
||||
# Set the cache size for astng objects.
|
||||
|
Loading…
Reference in New Issue
Block a user