[pylint]

max-line-length=160

load-plugins=
    pylint.extensions.docstyle,

disable=
    bad-super-call,  # flakey test, can report false positives due to inference issue when using deprecate_calls plugin
    docstring-first-line-empty,
    consider-using-f-string,  # many occurrences
    cyclic-import,  # consistent results require running with --jobs 1 and testing all files
    deprecated-argument,  # results vary by Python version
    deprecated-attribute,  # results vary by Python version
    deprecated-class,  # results vary by Python version
    deprecated-decorator,  # results vary by Python version
    deprecated-method,  # results vary by Python version
    deprecated-module,  # results vary by Python version
    duplicate-code,  # consistent results require running with --jobs 1 and testing all files
    import-outside-toplevel,  # common pattern in ansible related code
    broad-exception-raised,  # many exceptions with no need for a custom type
    too-few-public-methods,
    too-many-public-methods,
    too-many-ancestors,
    too-many-arguments,
    too-many-branches,
    too-many-instance-attributes,
    too-many-lines,
    too-many-locals,
    too-many-nested-blocks,
    too-many-return-statements,
    too-many-statements,
    too-many-positional-arguments,
    use-dict-literal,  # ignoring as a common style issue
    unspecified-encoding,  # always run with UTF-8 encoding enforced
    useless-return,  # complains about returning None when the return type is optional

bad-names=
    _,
    bar,
    baz,
    foo,
    tata,
    toto,
    tutu,

good-names=
    C,
    ex,
    i,
    j,
    k,
    Run,

class-attribute-rgx=[A-Za-z_][A-Za-z0-9_]{1,40}$
attr-rgx=[a-z_][a-z0-9_]{1,40}$
method-rgx=[a-z_][a-z0-9_]{1,40}$
function-rgx=[a-z_][a-z0-9_]{1,40}$

# Use the regex from earlier versions of pylint.
# See: https://github.com/PyCQA/pylint/pull/7322
typevar-rgx=^_{0,2}(?:[^\W\da-z_]+|(?:[^\W\da-z_]+[^\WA-Z_]+)+T?(?<!Type))(?:_co(?:ntra)?)?$

preferred-modules =
    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,
