diff options
author | Matt Clay <matt@mystile.com> | 2020-06-22 14:29:45 -0700 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2020-07-13 18:57:17 -0700 |
commit | 957f0c27fc64d2c43a69a6fc5ff7c6f5f81fab2a (patch) | |
tree | bcdbd7a644901c1465f76f2298650aee9a6a77e1 /lib | |
parent | a707466c0b919e686aa54814182bd4559fccaa0d (diff) | |
download | ansible-957f0c27fc64d2c43a69a6fc5ff7c6f5f81fab2a.tar.gz |
[stable-2.10] Fix boilerplate in setup.py and lib/ansible/ dir..
(cherry picked from commit 234994fc075222f28943313024c7df5d7010bc37)
Co-authored-by: Matt Clay <matt@mystile.com>
Diffstat (limited to 'lib')
25 files changed, 61 insertions, 0 deletions
diff --git a/lib/ansible/module_utils/_text.py b/lib/ansible/module_utils/_text.py index 373976ce2d..6cd77217eb 100644 --- a/lib/ansible/module_utils/_text.py +++ b/lib/ansible/module_utils/_text.py @@ -1,5 +1,7 @@ # Copyright (c), Toshio Kuratomi <tkuratomi@ansible.com> 2016 # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type """ .. warn:: Use ansible.module_utils.common.text.converters instead. diff --git a/lib/ansible/module_utils/api.py b/lib/ansible/module_utils/api.py index 781518591f..ca1d978f8f 100644 --- a/lib/ansible/module_utils/api.py +++ b/lib/ansible/module_utils/api.py @@ -41,6 +41,9 @@ The 'api' module provides the following common argument specs: - retries: number of attempts - retry_pause: delay between attempts in seconds """ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import time diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 5b896cf422..b160cecce0 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -3,6 +3,7 @@ # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function +__metaclass__ = type FILE_ATTRIBUTES = { 'A': 'noatime', diff --git a/lib/ansible/module_utils/common/network.py b/lib/ansible/module_utils/common/network.py index cf79db511e..9e1c1ab78b 100644 --- a/lib/ansible/module_utils/common/network.py +++ b/lib/ansible/module_utils/common/network.py @@ -3,6 +3,9 @@ # General networking tools that may be used by all modules +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import re from struct import pack from socket import inet_ntoa diff --git a/lib/ansible/module_utils/connection.py b/lib/ansible/module_utils/connection.py index 40e5cd22fc..a76fdb6bcc 100644 --- a/lib/ansible/module_utils/connection.py +++ b/lib/ansible/module_utils/connection.py @@ -26,6 +26,9 @@ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import os import hashlib import json diff --git a/lib/ansible/module_utils/facts/sysctl.py b/lib/ansible/module_utils/facts/sysctl.py index 2b2ca43b5b..4c82dc2287 100644 --- a/lib/ansible/module_utils/facts/sysctl.py +++ b/lib/ansible/module_utils/facts/sysctl.py @@ -13,6 +13,9 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import re diff --git a/lib/ansible/module_utils/facts/utils.py b/lib/ansible/module_utils/facts/utils.py index ca67098fe6..9fd00afd49 100644 --- a/lib/ansible/module_utils/facts/utils.py +++ b/lib/ansible/module_utils/facts/utils.py @@ -13,6 +13,9 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import os diff --git a/lib/ansible/module_utils/json_utils.py b/lib/ansible/module_utils/json_utils.py index 571fe5b020..d5639fa3f8 100644 --- a/lib/ansible/module_utils/json_utils.py +++ b/lib/ansible/module_utils/json_utils.py @@ -24,6 +24,9 @@ # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import json diff --git a/lib/ansible/module_utils/parsing/convert_bool.py b/lib/ansible/module_utils/parsing/convert_bool.py index e0516efd86..7eea875f79 100644 --- a/lib/ansible/module_utils/parsing/convert_bool.py +++ b/lib/ansible/module_utils/parsing/convert_bool.py @@ -1,6 +1,9 @@ # Copyright: 2017, Ansible Project # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause ) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + from ansible.module_utils.six import binary_type, text_type from ansible.module_utils._text import to_text diff --git a/lib/ansible/module_utils/pycompat24.py b/lib/ansible/module_utils/pycompat24.py index 70d0c38eeb..0c050dffad 100644 --- a/lib/ansible/module_utils/pycompat24.py +++ b/lib/ansible/module_utils/pycompat24.py @@ -26,6 +26,9 @@ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import sys diff --git a/lib/ansible/module_utils/service.py b/lib/ansible/module_utils/service.py index 3e57b0217b..7369bd786f 100644 --- a/lib/ansible/module_utils/service.py +++ b/lib/ansible/module_utils/service.py @@ -26,6 +26,9 @@ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import glob import os import pickle diff --git a/lib/ansible/module_utils/splitter.py b/lib/ansible/module_utils/splitter.py index 09605eda05..c170b1cf7c 100644 --- a/lib/ansible/module_utils/splitter.py +++ b/lib/ansible/module_utils/splitter.py @@ -26,6 +26,9 @@ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + def _get_quote_state(token, quote_char): ''' diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py index a239da411f..2502df092b 100644 --- a/lib/ansible/module_utils/urls.py +++ b/lib/ansible/module_utils/urls.py @@ -32,6 +32,9 @@ for users making use of a module. If possible, avoid third party libraries by us this code instead. ''' +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import atexit import base64 import email.mime.multipart diff --git a/lib/ansible/module_utils/yumdnf.py b/lib/ansible/module_utils/yumdnf.py index 47539bf3bd..0d715bfca0 100644 --- a/lib/ansible/module_utils/yumdnf.py +++ b/lib/ansible/module_utils/yumdnf.py @@ -9,6 +9,9 @@ # - Abhijeet Kasurde (@Akasurde) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import os import time import glob diff --git a/lib/ansible/plugins/doc_fragments/backup.py b/lib/ansible/plugins/doc_fragments/backup.py index 5d46528f26..d2e76dc192 100644 --- a/lib/ansible/plugins/doc_fragments/backup.py +++ b/lib/ansible/plugins/doc_fragments/backup.py @@ -2,6 +2,8 @@ # Copyright: (c) 2015, Ansible, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type class ModuleDocFragment(object): diff --git a/lib/ansible/plugins/doc_fragments/constructed.py b/lib/ansible/plugins/doc_fragments/constructed.py index c14e5739d2..f2788da0b0 100644 --- a/lib/ansible/plugins/doc_fragments/constructed.py +++ b/lib/ansible/plugins/doc_fragments/constructed.py @@ -2,6 +2,8 @@ # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type class ModuleDocFragment(object): diff --git a/lib/ansible/plugins/doc_fragments/decrypt.py b/lib/ansible/plugins/doc_fragments/decrypt.py index f9b3e42ddb..ea7cf59bc3 100644 --- a/lib/ansible/plugins/doc_fragments/decrypt.py +++ b/lib/ansible/plugins/doc_fragments/decrypt.py @@ -2,6 +2,8 @@ # Copyright: (c) 2017, Brian Coca <bcoca@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type class ModuleDocFragment(object): diff --git a/lib/ansible/plugins/doc_fragments/default_callback.py b/lib/ansible/plugins/doc_fragments/default_callback.py index c426cc11c1..8093694a65 100644 --- a/lib/ansible/plugins/doc_fragments/default_callback.py +++ b/lib/ansible/plugins/doc_fragments/default_callback.py @@ -2,6 +2,8 @@ # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type class ModuleDocFragment(object): diff --git a/lib/ansible/plugins/doc_fragments/files.py b/lib/ansible/plugins/doc_fragments/files.py index 766b933a40..ed1d9b5006 100644 --- a/lib/ansible/plugins/doc_fragments/files.py +++ b/lib/ansible/plugins/doc_fragments/files.py @@ -2,6 +2,8 @@ # Copyright: (c) 2014, Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type class ModuleDocFragment(object): diff --git a/lib/ansible/plugins/doc_fragments/inventory_cache.py b/lib/ansible/plugins/doc_fragments/inventory_cache.py index 9eefc23d45..342be33427 100644 --- a/lib/ansible/plugins/doc_fragments/inventory_cache.py +++ b/lib/ansible/plugins/doc_fragments/inventory_cache.py @@ -2,6 +2,8 @@ # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type class ModuleDocFragment(object): diff --git a/lib/ansible/plugins/doc_fragments/return_common.py b/lib/ansible/plugins/doc_fragments/return_common.py index 6f3866ba5c..6f54288050 100644 --- a/lib/ansible/plugins/doc_fragments/return_common.py +++ b/lib/ansible/plugins/doc_fragments/return_common.py @@ -2,6 +2,8 @@ # Copyright: (c) 2016, Ansible, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type class ModuleDocFragment(object): diff --git a/lib/ansible/plugins/doc_fragments/shell_common.py b/lib/ansible/plugins/doc_fragments/shell_common.py index a80e7f7147..7ba4049ca6 100644 --- a/lib/ansible/plugins/doc_fragments/shell_common.py +++ b/lib/ansible/plugins/doc_fragments/shell_common.py @@ -1,5 +1,7 @@ # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type class ModuleDocFragment(object): diff --git a/lib/ansible/plugins/doc_fragments/shell_windows.py b/lib/ansible/plugins/doc_fragments/shell_windows.py index 66c9603e7f..d6d4d7c59c 100644 --- a/lib/ansible/plugins/doc_fragments/shell_windows.py +++ b/lib/ansible/plugins/doc_fragments/shell_windows.py @@ -1,5 +1,7 @@ # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type class ModuleDocFragment(object): diff --git a/lib/ansible/plugins/doc_fragments/url.py b/lib/ansible/plugins/doc_fragments/url.py index d6fdcc384d..ddb8e4d114 100644 --- a/lib/ansible/plugins/doc_fragments/url.py +++ b/lib/ansible/plugins/doc_fragments/url.py @@ -2,6 +2,8 @@ # Copyright: (c) 2018, John Barker <gundalow@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type class ModuleDocFragment(object): diff --git a/lib/ansible/plugins/doc_fragments/validate.py b/lib/ansible/plugins/doc_fragments/validate.py index 24c1aa4c74..99bbe00049 100644 --- a/lib/ansible/plugins/doc_fragments/validate.py +++ b/lib/ansible/plugins/doc_fragments/validate.py @@ -2,6 +2,8 @@ # Copyright: (c) 2015, Ansible, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type class ModuleDocFragment(object): |