Improve consistency of ansible-test pylint results. (#70132)

* Disable too-many-ancestors pylint check.

This check was only enabled for ansible-test code.

In some cases this check counts 1 more ancestor in python 3.7+ than under python 3.6, making the check inconsistent and unsuitable for use in ansible-test.

* Disable additional pylint checks:

- import-error
- no-name-in-module

These checks were only enabled for ansible-test code.

These checks provide inconsistent results since they are dependent on available imports, which vary between environments.

It may be practical to enable these checks in the future if changes are made to ensure a consistent test environment for pylint.
This commit is contained in:
Matt Clay 2020-06-17 17:03:41 -07:00 committed by GitHub
parent e3f3b4002e
commit feb163e0de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 6 deletions

View file

@ -5,8 +5,11 @@ disable=
consider-using-set-comprehension, # requires Python 2.7+, but we still require Python 2.6 support
cyclic-import, # consistent results require running with --jobs 1 and testing all files
duplicate-code, # consistent results require running with --jobs 1 and testing all files
import-error, # inconsistent results which depend on the availability of imports
no-name-in-module, # inconsistent results which depend on the availability of imports
no-self-use,
too-few-public-methods,
too-many-ancestors, # inconsistent results between python 3.6 and 3.7+
too-many-arguments,
too-many-branches,
too-many-instance-attributes,

View file

@ -35,7 +35,7 @@ disable=
function-redefined,
global-statement,
global-variable-undefined,
import-error,
import-error, # inconsistent results which depend on the availability of imports
import-self,
inconsistent-return-statements,
invalid-envvar-default,
@ -53,7 +53,7 @@ disable=
no-else-return,
no-init,
no-member,
no-name-in-module,
no-name-in-module, # inconsistent results which depend on the availability of imports
no-self-use,
no-value-for-parameter,
non-iterator-returned,
@ -78,7 +78,7 @@ disable=
super-init-not-called,
superfluous-parens,
too-few-public-methods,
too-many-ancestors,
too-many-ancestors, # inconsistent results between python 3.6 and 3.7+
too-many-arguments,
too-many-boolean-expressions,
too-many-branches,

View file

@ -35,7 +35,7 @@ disable=
function-redefined,
global-statement,
global-variable-undefined,
import-error,
import-error, # inconsistent results which depend on the availability of imports
import-self,
inconsistent-return-statements,
invalid-envvar-default,
@ -53,7 +53,7 @@ disable=
no-else-return,
no-init,
no-member,
no-name-in-module,
no-name-in-module, # inconsistent results which depend on the availability of imports
no-self-use,
no-value-for-parameter,
non-iterator-returned,
@ -78,7 +78,7 @@ disable=
super-init-not-called,
superfluous-parens,
too-few-public-methods,
too-many-ancestors,
too-many-ancestors, # inconsistent results between python 3.6 and 3.7+
too-many-arguments,
too-many-boolean-expressions,
too-many-branches,

View file

@ -5,8 +5,11 @@ disable=
consider-using-set-comprehension, # requires Python 2.7+, but we still require Python 2.6 support
cyclic-import, # consistent results require running with --jobs 1 and testing all files
duplicate-code, # consistent results require running with --jobs 1 and testing all files
import-error, # inconsistent results which depend on the availability of imports
missing-docstring,
no-name-in-module, # inconsistent results which depend on the availability of imports
too-few-public-methods,
too-many-ancestors, # inconsistent results between python 3.6 and 3.7+
too-many-arguments,
too-many-branches,
too-many-instance-attributes,