summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2024-10-04 17:31:46 +0200
committerGitHub <noreply@github.com>2024-10-04 17:31:46 +0200
commit3cf308f6726ac8d0b8fd850b8f88a46ae0da546e (patch)
treeb5956a4b0dfcd9c5e5ad7ac22390b75246109e92
parentImplicit flush_handlers inherit play tags (#83968) (diff)
downloadansible-3cf308f6726ac8d0b8fd850b8f88a46ae0da546e.tar.xz
ansible-3cf308f6726ac8d0b8fd850b8f88a46ae0da546e.zip
ansible-test - Disable pylint deprecated-* rules (#84050)
-rw-r--r--changelogs/fragments/ansible-test-update.yml1
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test-target.cfg4
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test.cfg4
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pylint/config/code-smell.cfg4
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pylint/config/collection.cfg4
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pylint/config/default.cfg4
-rw-r--r--test/sanity/ignore.txt2
7 files changed, 21 insertions, 2 deletions
diff --git a/changelogs/fragments/ansible-test-update.yml b/changelogs/fragments/ansible-test-update.yml
index fdb6ed2f3d..9facea0bd6 100644
--- a/changelogs/fragments/ansible-test-update.yml
+++ b/changelogs/fragments/ansible-test-update.yml
@@ -1,3 +1,4 @@
minor_changes:
- ansible-test - Update ``pylint`` sanity test to use version 3.3.1.
- ansible-test - Default to Python 3.13 in the ``base`` and ``default`` containers.
+ - ansible-test - Disable the ``deprecated-`` prefixed ``pylint`` rules as their results vary by Python version.
diff --git a/test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test-target.cfg b/test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test-target.cfg
index 0f42d75961..4604290dba 100644
--- a/test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test-target.cfg
+++ b/test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test-target.cfg
@@ -3,6 +3,10 @@
disable=
consider-using-f-string, # Python 2.x support still required
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
diff --git a/test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test.cfg b/test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test.cfg
index 6067069dc5..9fc048d38b 100644
--- a/test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test.cfg
+++ b/test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test.cfg
@@ -3,6 +3,10 @@
disable=
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
diff --git a/test/lib/ansible_test/_util/controller/sanity/pylint/config/code-smell.cfg b/test/lib/ansible_test/_util/controller/sanity/pylint/config/code-smell.cfg
index 39ed050eef..21c3287126 100644
--- a/test/lib/ansible_test/_util/controller/sanity/pylint/config/code-smell.cfg
+++ b/test/lib/ansible_test/_util/controller/sanity/pylint/config/code-smell.cfg
@@ -3,6 +3,10 @@
disable=
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
diff --git a/test/lib/ansible_test/_util/controller/sanity/pylint/config/collection.cfg b/test/lib/ansible_test/_util/controller/sanity/pylint/config/collection.cfg
index 60048abb88..f013b7eb2b 100644
--- a/test/lib/ansible_test/_util/controller/sanity/pylint/config/collection.cfg
+++ b/test/lib/ansible_test/_util/controller/sanity/pylint/config/collection.cfg
@@ -30,7 +30,11 @@ disable=
consider-using-max-builtin,
consider-using-min-builtin,
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-comment, # custom plugin only used by ansible-core, not collections
+ 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
diff --git a/test/lib/ansible_test/_util/controller/sanity/pylint/config/default.cfg b/test/lib/ansible_test/_util/controller/sanity/pylint/config/default.cfg
index c4b9a8f4de..f0b35550eb 100644
--- a/test/lib/ansible_test/_util/controller/sanity/pylint/config/default.cfg
+++ b/test/lib/ansible_test/_util/controller/sanity/pylint/config/default.cfg
@@ -28,6 +28,10 @@ disable=
consider-using-max-builtin,
consider-using-min-builtin,
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
diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt
index c252426ddb..17f893aabf 100644
--- a/test/sanity/ignore.txt
+++ b/test/sanity/ignore.txt
@@ -60,8 +60,6 @@ lib/ansible/plugins/cache/base.py ansible-doc!skip # not a plugin, but a stub f
lib/ansible/plugins/callback/__init__.py pylint:arguments-renamed
lib/ansible/plugins/inventory/advanced_host_list.py pylint:arguments-renamed
lib/ansible/plugins/inventory/host_list.py pylint:arguments-renamed
-lib/ansible/utils/collection_loader/_collection_finder.py pylint:deprecated-class
-lib/ansible/utils/collection_loader/_collection_meta.py pylint:deprecated-class
test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/tests/integration/targets/hello/files/bad.py pylint:ansible-bad-function # ignore, required for testing
test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/tests/integration/targets/hello/files/bad.py pylint:ansible-bad-import-from # ignore, required for testing
test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/tests/integration/targets/hello/files/bad.py pylint:ansible-bad-import # ignore, required for testing