From 48cc39a2b1f9af546bc48a49fd93d05730cd3642 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 27 Jun 2021 09:59:19 +0200 Subject: [PATCH] _mount module utils - fixed sanity checks (#2883) (#2884) * updated _mount.py, removed ignore lines * added changelog fragment (cherry picked from commit acf7b106c93dd7a2de3ce609b5fda512c352e528) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- changelogs/fragments/2883-_mount-fixed-sanity-checks.yml | 2 ++ plugins/module_utils/_mount.py | 4 ++++ tests/sanity/ignore-2.10.txt | 2 -- tests/sanity/ignore-2.11.txt | 2 -- tests/sanity/ignore-2.12.txt | 2 -- tests/sanity/ignore-2.9.txt | 2 -- 6 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 changelogs/fragments/2883-_mount-fixed-sanity-checks.yml diff --git a/changelogs/fragments/2883-_mount-fixed-sanity-checks.yml b/changelogs/fragments/2883-_mount-fixed-sanity-checks.yml new file mode 100644 index 0000000000..35496e1233 --- /dev/null +++ b/changelogs/fragments/2883-_mount-fixed-sanity-checks.yml @@ -0,0 +1,2 @@ +bugfixes: + - _mount module utils - fixed the sanity checks (https://github.com/ansible-collections/community.general/pull/2883). diff --git a/plugins/module_utils/_mount.py b/plugins/module_utils/_mount.py index 62feb354cc..58be0e8b68 100644 --- a/plugins/module_utils/_mount.py +++ b/plugins/module_utils/_mount.py @@ -48,6 +48,10 @@ # agrees to be bound by the terms and conditions of this License # Agreement. +from __future__ import absolute_import, division, print_function + +__metaclass__ = type + import os diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index e10a89576f..e60d34ff28 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -1,8 +1,6 @@ plugins/module_utils/cloud.py pylint:bad-option-value # a pylint test that is disabled was modified over time plugins/module_utils/compat/ipaddress.py no-assert plugins/module_utils/compat/ipaddress.py no-unicode-literals -plugins/module_utils/_mount.py future-import-boilerplate -plugins/module_utils/_mount.py metaclass-boilerplate plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 00680b32a2..e8f16e559b 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -1,7 +1,5 @@ plugins/module_utils/compat/ipaddress.py no-assert plugins/module_utils/compat/ipaddress.py no-unicode-literals -plugins/module_utils/_mount.py future-import-boilerplate -plugins/module_utils/_mount.py metaclass-boilerplate plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 3403e1fd55..957078acc1 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -1,7 +1,5 @@ plugins/module_utils/compat/ipaddress.py no-assert plugins/module_utils/compat/ipaddress.py no-unicode-literals -plugins/module_utils/_mount.py future-import-boilerplate -plugins/module_utils/_mount.py metaclass-boilerplate plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/cloud/misc/rhevm.py validate-modules:parameter-state-invalid-choice diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt index ea176611b6..0f65e513a9 100644 --- a/tests/sanity/ignore-2.9.txt +++ b/tests/sanity/ignore-2.9.txt @@ -1,8 +1,6 @@ plugins/module_utils/cloud.py pylint:bad-option-value # a pylint test that is disabled was modified over time plugins/module_utils/compat/ipaddress.py no-assert plugins/module_utils/compat/ipaddress.py no-unicode-literals -plugins/module_utils/_mount.py future-import-boilerplate -plugins/module_utils/_mount.py metaclass-boilerplate plugins/modules/cloud/lxc/lxc_container.py use-argspec-type-path plugins/modules/cloud/lxc/lxc_container.py validate-modules:use-run-command-not-popen plugins/modules/cloud/rackspace/rax.py use-argspec-type-path