More strict pylint checking of ansible-test code.

pull/77118/head
Matt Clay 3 years ago
parent b613808277
commit 5a6e05affb

@ -3,14 +3,11 @@
disable= disable=
cyclic-import, # consistent results require running with --jobs 1 and testing all files 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 duplicate-code, # consistent results require running with --jobs 1 and testing all files
import-error, # inconsistent results which depend on the availability of imports
import-outside-toplevel, # common pattern in ansible related code import-outside-toplevel, # common pattern in ansible related code
no-name-in-module, # inconsistent results which depend on the availability of imports
no-self-use, no-self-use,
raise-missing-from, # Python 2.x does not support raise from raise-missing-from, # Python 2.x does not support raise from
super-with-arguments, # Python 2.x does not support super without arguments super-with-arguments, # Python 2.x does not support super without arguments
too-few-public-methods, too-few-public-methods,
too-many-ancestors, # inconsistent results between python 3.6 and 3.7+
too-many-arguments, too-many-arguments,
too-many-branches, too-many-branches,
too-many-instance-attributes, too-many-instance-attributes,
@ -50,3 +47,8 @@ function-rgx=[a-z_][a-z0-9_]{1,40}$
preferred-modules = preferred-modules =
distutils.version:ansible.module_utils.compat.version, distutils.version:ansible.module_utils.compat.version,
# These modules are used by ansible-test, but will not be present in the virtual environment running pylint.
# Listing them here makes it possible to enable the import-error check.
ignored-modules =
py,

@ -3,9 +3,7 @@
disable= disable=
cyclic-import, # consistent results require running with --jobs 1 and testing all files 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 duplicate-code, # consistent results require running with --jobs 1 and testing all files
import-error, # inconsistent results which depend on the availability of imports
import-outside-toplevel, # common pattern in ansible related code import-outside-toplevel, # common pattern in ansible related code
no-name-in-module, # inconsistent results which depend on the availability of imports
no-self-use, no-self-use,
raise-missing-from, # Python 2.x does not support raise from raise-missing-from, # Python 2.x does not support raise from
too-few-public-methods, too-few-public-methods,
@ -48,3 +46,10 @@ function-rgx=[a-z_][a-z0-9_]{1,40}$
preferred-modules = preferred-modules =
distutils.version:ansible.module_utils.compat.version, distutils.version:ansible.module_utils.compat.version,
# These modules are used by ansible-test, but will not be present in the virtual environment running pylint.
# Listing them here makes it possible to enable the import-error check.
ignored-modules =
cryptography,
coverage,
yamllint,

Loading…
Cancel
Save