Require `from __future__ import annotations` (#81902)

pull/81903/head
Matt Clay 2 years ago committed by GitHub
parent 921efce43a
commit 9f899f9492
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,8 +7,7 @@ Keep in mind that Azure Pipelines does not enforce unique job display names (onl
It is up to pipeline authors to avoid name collisions when deviating from the recommended format. It is up to pipeline authors to avoid name collisions when deviating from the recommended format.
""" """
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import os import os
import re import re

@ -4,6 +4,7 @@ Upload code coverage reports to codecov.io.
Multiple coverage files from multiple languages are accepted and aggregated after upload. Multiple coverage files from multiple languages are accepted and aggregated after upload.
Python coverage, as well as PowerShell and Python stubs can all be uploaded. Python coverage, as well as PowerShell and Python stubs can all be uploaded.
""" """
from __future__ import annotations
import argparse import argparse
import dataclasses import dataclasses

@ -1,8 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
"""Prepends a relative timestamp to each input line from stdin and writes it to stdout.""" """Prepends a relative timestamp to each input line from stdin and writes it to stdout."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import sys import sys
import time import time

@ -19,8 +19,7 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
"""CLI tool for downloading results from Azure Pipelines CI runs.""" """CLI tool for downloading results from Azure Pipelines CI runs."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# noinspection PyCompatibility # noinspection PyCompatibility
import argparse import argparse

@ -17,8 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
from ansible.utils.color import stringc from ansible.utils.color import stringc
import requests import requests

@ -18,8 +18,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
"""CLI tool for reporting on incidental test coverage.""" """CLI tool for reporting on incidental test coverage."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# noinspection PyCompatibility # noinspection PyCompatibility
import argparse import argparse

@ -20,8 +20,7 @@
"""CLI tool for starting new CI runs.""" """CLI tool for starting new CI runs."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# noinspection PyCompatibility # noinspection PyCompatibility
import argparse import argparse

@ -16,9 +16,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from github.PullRequest import PullRequest from github.PullRequest import PullRequest
from github import Github from github import Github

@ -2,8 +2,7 @@
# PYTHON_ARGCOMPLETE_OK # PYTHON_ARGCOMPLETE_OK
"""A tool to aggregate data about Ansible source and testing into a sqlite DB for reporting.""" """A tool to aggregate data about Ansible source and testing into a sqlite DB for reporting."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import argparse import argparse
import json import json

@ -26,8 +26,7 @@
# You will likely want to adjust this to remove sensitive data or # You will likely want to adjust this to remove sensitive data or
# ensure the `returns` value is correct, and to write a useful description # ensure the `returns` value is correct, and to write a useful description
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
from collections import OrderedDict from collections import OrderedDict
import json import json

@ -28,8 +28,7 @@
# ./hacking/test-module.py -m lib/ansible/modules/lineinfile.py -a "dest=/etc/exports line='/srv/home hostname1(rw,sync)'" --check # ./hacking/test-module.py -m lib/ansible/modules/lineinfile.py -a "dest=/etc/exports line='/srv/home hostname1(rw,sync)'" --check
# ./hacking/test-module.py -m lib/ansible/modules/command.py -a "echo hello" -n -o "test_hello" # ./hacking/test-module.py -m lib/ansible/modules/command.py -a "echo hello" -n -o "test_hello"
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import glob import glob
import optparse import optparse

@ -9,8 +9,7 @@ and the current ansible_facts regarding the distribution version.
This assumes a working ansible version in the path. This assumes a working ansible version in the path.
""" """
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import json import json
import os.path import os.path

@ -15,9 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
# make vendored top-level modules accessible EARLY # make vendored top-level modules accessible EARLY
import ansible._vendor import ansible._vendor

@ -1,5 +1,6 @@
# Copyright: (c) 2021, Matt Martz <matt@sivel.net> # Copyright: (c) 2021, Matt Martz <matt@sivel.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
import argparse import argparse
import importlib import importlib

@ -1,8 +1,7 @@
# (c) 2020 Ansible Project # (c) 2020 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import os import os
import pkgutil import pkgutil

@ -3,9 +3,7 @@
# Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import locale import locale
import os import os

@ -4,8 +4,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# PYTHON_ARGCOMPLETE_OK # PYTHON_ARGCOMPLETE_OK
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first # ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first
from ansible.cli import CLI from ansible.cli import CLI

@ -1,5 +1,4 @@
# Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type

@ -1,8 +1,7 @@
# Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import copy import copy
import operator import operator

@ -3,8 +3,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# PYTHON_ARGCOMPLETE_OK # PYTHON_ARGCOMPLETE_OK
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first # ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first
from ansible.cli import CLI from ansible.cli import CLI

@ -5,8 +5,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# PYTHON_ARGCOMPLETE_OK # PYTHON_ARGCOMPLETE_OK
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first # ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first
from ansible.cli import CLI from ansible.cli import CLI

@ -4,8 +4,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# PYTHON_ARGCOMPLETE_OK # PYTHON_ARGCOMPLETE_OK
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first # ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first
from ansible.cli import CLI from ansible.cli import CLI

@ -4,8 +4,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# PYTHON_ARGCOMPLETE_OK # PYTHON_ARGCOMPLETE_OK
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first # ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first
from ansible.cli import CLI from ansible.cli import CLI

@ -4,8 +4,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# PYTHON_ARGCOMPLETE_OK # PYTHON_ARGCOMPLETE_OK
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first # ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first
from ansible.cli import CLI from ansible.cli import CLI

@ -4,8 +4,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# PYTHON_ARGCOMPLETE_OK # PYTHON_ARGCOMPLETE_OK
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first # ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first
from ansible.cli import CLI from ansible.cli import CLI

@ -4,8 +4,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# PYTHON_ARGCOMPLETE_OK # PYTHON_ARGCOMPLETE_OK
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first # ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first
from ansible.cli import CLI from ansible.cli import CLI

@ -1,10 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
# Copyright: (c) 2017, Ansible Project # Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import fcntl import fcntl
import hashlib import hashlib

@ -4,8 +4,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# PYTHON_ARGCOMPLETE_OK # PYTHON_ARGCOMPLETE_OK
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first # ansible.cli needs to be imported first, to ensure the source bin/* scripts run that code first
from ansible.cli import CLI from ansible.cli import CLI

@ -1,5 +1,6 @@
# (c) 2019 Ansible Project # (c) 2019 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
from ansible.errors import AnsibleError from ansible.errors import AnsibleError
from ansible.cli.galaxy import with_collection_artifacts_manager from ansible.cli.galaxy import with_collection_artifacts_manager

@ -15,12 +15,9 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
''' '''
Compat library for ansible. This contains compatibility definitions for older python Compat library for ansible. This contains compatibility definitions for older python
When we need to import a module differently depending on python version, do it When we need to import a module differently depending on python version, do it
here. Then in the code we can simply import from compat in order to get what we want. here. Then in the code we can simply import from compat in order to get what we want.
''' '''
from __future__ import annotations

@ -1,8 +1,7 @@
# Copyright: Contributors to the Ansible project # Copyright: Contributors to the Ansible project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import sys import sys

@ -15,10 +15,6 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
# NOT_BUNDLED # NOT_BUNDLED
''' '''
@ -27,6 +23,8 @@ package exists on pypi to backport the functionality as far as python-2.6.
Implementation previously resided here - maintaining this file after the Implementation previously resided here - maintaining this file after the
move to ansible.module_utils for code backwards compatibility. move to ansible.module_utils for code backwards compatibility.
''' '''
from __future__ import annotations
import sys import sys
from ansible.module_utils.compat import selectors from ansible.module_utils.compat import selectors
sys.modules['ansible.compat.selectors'] = selectors sys.modules['ansible.compat.selectors'] = selectors

@ -1,8 +1,7 @@
# Copyright: (c) 2017, Ansible Project # Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import atexit import atexit
import configparser import configparser

@ -2,8 +2,7 @@
# Copyright: (c) 2017, Ansible Project # Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import re import re

@ -1,10 +1,6 @@
# Copyright: (c) 2018, Toshio Kuratomi <tkuratomi@ansible.com> # Copyright: (c) 2018, Toshio Kuratomi <tkuratomi@ansible.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
""" """
Context of the running Ansible. Context of the running Ansible.
@ -14,6 +10,7 @@ running the ansible command line tools.
These APIs are still in flux so do not use them unless you are willing to update them with every Ansible release These APIs are still in flux so do not use them unless you are willing to update them with every Ansible release
""" """
from __future__ import annotations
from collections.abc import Mapping, Set from collections.abc import Mapping, Set

@ -15,9 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import re import re
import traceback import traceback

@ -15,9 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
__all__ = [ __all__ = [
'YAML_SYNTAX_ERROR', 'YAML_SYNTAX_ERROR',

@ -15,6 +15,4 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

@ -4,8 +4,7 @@
# FUTURE: this could be swapped out for our bundled version of distro to move more complete platform # FUTURE: this could be swapped out for our bundled version of distro to move more complete platform
# logic to the targets, so long as we maintain Py2.6 compat and don't need to do any kind of script assembly # logic to the targets, so long as we maintain Py2.6 compat and don't need to do any kind of script assembly
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import json import json
import platform import platform

@ -1,8 +1,7 @@
# Copyright: (c) 2018 Ansible Project # Copyright: (c) 2018 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import bisect import bisect
import json import json

@ -16,9 +16,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import ast import ast
import base64 import base64

@ -15,9 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import fnmatch import fnmatch

@ -15,9 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os import os

@ -1,8 +1,7 @@
# (c) 2018 Ansible Project # (c) 2018 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import base64 import base64
import errno import errno

@ -15,6 +15,4 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

@ -15,9 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os import os
import sys import sys

@ -15,9 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from collections.abc import MutableMapping from collections.abc import MutableMapping

@ -1,8 +1,7 @@
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2017 Ansible Project # (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import os import os
import pty import pty

@ -15,9 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os import os
import sys import sys

@ -2,8 +2,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
from ansible import constants as C from ansible import constants as C
from ansible.parsing.dataloader import DataLoader from ansible.parsing.dataloader import DataLoader

@ -20,8 +20,7 @@
######################################################################## ########################################################################
''' This manages remote shared Ansible objects, mainly roles''' ''' This manages remote shared Ansible objects, mainly roles'''
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import os import os

@ -2,8 +2,7 @@
# Copyright: (c) 2019, Ansible Project # Copyright: (c) 2019, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import collections import collections
import datetime import datetime

@ -3,8 +3,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""Installed collections management package.""" """Installed collections management package."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import errno import errno
import fnmatch import fnmatch

@ -3,8 +3,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""Concrete collection candidate management helper module.""" """Concrete collection candidate management helper module."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import json import json
import os import os

@ -3,8 +3,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""A facade for interfacing with multiple Galaxy instances.""" """A facade for interfacing with multiple Galaxy instances."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import typing as t import typing as t

@ -2,12 +2,14 @@
# Copyright: (c) 2022, Ansible Project # Copyright: (c) 2022, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""Signature verification helpers.""" """Signature verification helpers."""
from __future__ import annotations
from ansible.errors import AnsibleError from ansible.errors import AnsibleError
from ansible.galaxy.user_agent import user_agent from ansible.galaxy.user_agent import user_agent
from ansible.module_utils.urls import open_url from ansible.module_utils.urls import open_url
import contextlib import contextlib
import inspect
import os import os
import subprocess import subprocess
import sys import sys
@ -136,8 +138,8 @@ class GpgBaseError(Exception):
return ' '.join(cls.__doc__.split()) return ' '.join(cls.__doc__.split())
def __post_init__(self): def __post_init__(self):
for field in dc_fields(self): for field_name, field_type in inspect.get_annotations(type(self), eval_str=True).items():
super(GpgBaseError, self).__setattr__(field.name, field.type(getattr(self, field.name))) super(GpgBaseError, self).__setattr__(field_name, field_type(getattr(self, field_name)))
@frozen_dataclass @frozen_dataclass

@ -3,8 +3,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""Dependency resolution machinery.""" """Dependency resolution machinery."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import typing as t import typing as t

@ -4,8 +4,7 @@
"""Dependency structs.""" """Dependency structs."""
# FIXME: add caching all over the place # FIXME: add caching all over the place
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import os import os
import typing as t import typing as t

@ -3,8 +3,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""Dependency resolution exceptions.""" """Dependency resolution exceptions."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
try: try:
from resolvelib.resolvers import ( # pylint: disable=unused-import from resolvelib.resolvers import ( # pylint: disable=unused-import

@ -3,8 +3,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""Requirement provider interfaces.""" """Requirement provider interfaces."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import functools import functools
import typing as t import typing as t

@ -3,8 +3,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""Requiement reporter implementations.""" """Requiement reporter implementations."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
try: try:
from resolvelib import BaseReporter from resolvelib import BaseReporter

@ -3,8 +3,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""Requirement resolver implementations.""" """Requirement resolver implementations."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
try: try:
from resolvelib import Resolver from resolvelib import Resolver

@ -3,8 +3,7 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""Version comparison helpers.""" """Version comparison helpers."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import operator import operator

@ -19,8 +19,7 @@
# #
######################################################################## ########################################################################
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import errno import errno
import datetime import datetime

@ -18,8 +18,7 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# #
######################################################################## ########################################################################
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import base64 import base64
import os import os

@ -1,8 +1,7 @@
# Copyright: (c) 2019, Ansible Project # Copyright: (c) 2019, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import platform import platform
import sys import sys

@ -16,8 +16,7 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
############################################# #############################################
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import sys import sys

@ -14,8 +14,7 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
from collections.abc import Mapping, MutableMapping from collections.abc import Mapping, MutableMapping
from enum import Enum from enum import Enum

@ -16,8 +16,7 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
############################################# #############################################
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
from ansible.utils.vars import combine_vars from ansible.utils.vars import combine_vars

@ -15,9 +15,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from collections.abc import Mapping, MutableMapping from collections.abc import Mapping, MutableMapping

@ -16,8 +16,7 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
############################################# #############################################
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import fnmatch import fnmatch
import os import os

@ -1,11 +1,10 @@
# Copyright (c), Toshio Kuratomi <tkuratomi@ansible.com> 2016 # Copyright (c), Toshio Kuratomi <tkuratomi@ansible.com> 2016
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # 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. .. warn:: Use ansible.module_utils.common.text.converters instead.
""" """
from __future__ import annotations
# Backwards compat for people still calling it from this package # Backwards compat for people still calling it from this package
# pylint: disable=unused-import # pylint: disable=unused-import

@ -23,8 +23,7 @@ The 'api' module provides the following common argument specs:
- retries: number of attempts - retries: number of attempts
- retry_pause: delay between attempts in seconds - retry_pause: delay between attempts in seconds
""" """
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import copy import copy
import functools import functools

@ -6,8 +6,7 @@ Use `ansible.module_utils.six.moves.collections_abc` instead, which has been ava
This module exists only for backwards compatibility. This module exists only for backwards compatibility.
""" """
from __future__ import absolute_import, division, print_function from __future__ import annotations
__metaclass__ = type
# Although this was originally intended for internal use only, it has wide adoption in collections. # Although this was originally intended for internal use only, it has wide adoption in collections.
# This is due in part to sanity tests previously recommending its use over `collections` imports. # This is due in part to sanity tests previously recommending its use over `collections` imports.

@ -1,14 +1,12 @@
# Copyright (c) 2018, Ansible Project # Copyright (c) 2018, Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # 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
""" """
Modules in _utils are waiting to find a better home. If you need to use them, be prepared for them Modules in _utils are waiting to find a better home. If you need to use them, be prepared for them
to move to a different location in the future. to move to a different location in the future.
""" """
from __future__ import annotations
def get_all_subclasses(cls): def get_all_subclasses(cls):

@ -2,8 +2,7 @@
# Copyright (c) 2021 Ansible Project # Copyright (c) 2021 Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function from __future__ import annotations
__metaclass__ = type
from copy import deepcopy from copy import deepcopy

@ -3,8 +3,7 @@
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
"""Collection of low-level utility functions.""" """Collection of low-level utility functions."""
from __future__ import absolute_import, division, print_function from __future__ import annotations
__metaclass__ = type
from ansible.module_utils.six import binary_type, text_type from ansible.module_utils.six import binary_type, text_type

@ -3,8 +3,7 @@
# Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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 from __future__ import annotations
__metaclass__ = type
import re import re

@ -1,8 +1,7 @@
# Copyright (c) 2018, Ansible Project # Copyright (c) 2018, Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import os import os
import stat import stat

@ -2,9 +2,7 @@
# Copyright (c) 2019 Ansible Project # Copyright (c) 2019 Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json import json

@ -1,8 +1,7 @@
# Copyright (c), Ansible Project # Copyright (c), Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function from __future__ import annotations
__metaclass__ = type
from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.text.converters import to_native

@ -3,8 +3,7 @@
# General networking tools that may be used by all modules # General networking tools that may be used by all modules
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import re import re
from struct import pack from struct import pack

@ -2,8 +2,7 @@
# Copyright (c) 2019 Ansible Project # Copyright (c) 2019 Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function from __future__ import annotations
__metaclass__ = type
import datetime import datetime
import os import os

@ -1,8 +1,7 @@
# Copyright (c) 2018, Ansible Project # Copyright (c) 2018, Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import os import os

@ -1,8 +1,7 @@
# Copyright: (c) 2021, Ansible Project # Copyright: (c) 2021, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import os import os
import subprocess import subprocess

@ -2,8 +2,7 @@
# Copyright (c), Toshio Kuratomi <tkuratomi@ansible.com> 2016 # Copyright (c), Toshio Kuratomi <tkuratomi@ansible.com> 2016
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function from __future__ import annotations
__metaclass__ = type
import platform import platform

@ -3,8 +3,7 @@
# (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com>
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function from __future__ import annotations
__metaclass__ = type
import codecs import codecs
import datetime import datetime

@ -2,8 +2,7 @@
# Copyright (c) 2019 Ansible Project # Copyright (c) 2019 Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function from __future__ import annotations
__metaclass__ = type
import re import re

@ -2,8 +2,7 @@
# Copyright (c) 2019 Ansible Project # Copyright (c) 2019 Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function from __future__ import annotations
__metaclass__ = type
import json import json
import os import os

@ -2,8 +2,7 @@
# Copyright (c) 2019 Ansible Project # Copyright (c) 2019 Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function from __future__ import annotations
__metaclass__ = type
from ansible.module_utils.six import string_types from ansible.module_utils.six import string_types

@ -6,8 +6,7 @@ This file provides ease of use shortcuts for loading and dumping YAML,
preferring the YAML compiled C extensions to reduce duplicated code. preferring the YAML compiled C extensions to reduce duplicated code.
""" """
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
from functools import partial as _partial from functools import partial as _partial

@ -17,6 +17,7 @@
# does not follow this behavior and instead returns that no file descriptor # does not follow this behavior and instead returns that no file descriptor
# events have occurred rather than retry the syscall. The decision to drop # events have occurred rather than retry the syscall. The decision to drop
# support for select.devpoll is made to maintain 100% test coverage. # support for select.devpoll is made to maintain 100% test coverage.
from __future__ import annotations
import errno import errno
import math import math

@ -1,9 +1,7 @@
# Copyright (c) 2023 Ansible # Copyright (c) 2023 Ansible
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.module_utils.six import PY3 from ansible.module_utils.six import PY3

@ -1,9 +1,7 @@
# Copyright (c) 2020 Matt Martz <matt@sivel.net> # Copyright (c) 2020 Matt Martz <matt@sivel.net>
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
# Make coding more python3-ish from __future__ import annotations
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import sys import sys

@ -2,8 +2,7 @@
# Copyright (c) 2019 Ansible Project # Copyright (c) 2019 Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function from __future__ import annotations
__metaclass__ = type
import types # pylint: disable=unused-import import types # pylint: disable=unused-import
import warnings import warnings

@ -15,14 +15,13 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
''' '''
Compat selectors library. Python-3.5 has this builtin. The selectors2 Compat selectors library. Python-3.5 has this builtin. The selectors2
package exists on pypi to backport the functionality as far as python-2.6. package exists on pypi to backport the functionality as far as python-2.6.
''' '''
from __future__ import annotations
# The following makes it easier for us to script updates of the bundled code # The following makes it easier for us to script updates of the bundled code
_BUNDLED_METADATA = {"pypi_name": "selectors2", "version": "1.1.1", "version_constraints": ">1.0,<2.0"} _BUNDLED_METADATA = {"pypi_name": "selectors2", "version": "1.1.1", "version_constraints": ">1.0,<2.0"}

@ -1,8 +1,7 @@
# Copyright: (c) 2021, Ansible Project # Copyright: (c) 2021, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # 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) from __future__ import annotations
__metaclass__ = type
import os import os
import sys import sys

@ -1,6 +1,5 @@
"""Compatibility layer for the `typing` module, providing all Python versions access to the newest type-hinting features.""" """Compatibility layer for the `typing` module, providing all Python versions access to the newest type-hinting features."""
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
# pylint: disable=wildcard-import,unused-wildcard-import # pylint: disable=wildcard-import,unused-wildcard-import

@ -25,8 +25,7 @@ Every version number class implements the following interface:
of the same class, thus must follow the same rules) of the same class, thus must follow the same rules)
""" """
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import re import re

@ -26,8 +26,7 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # 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. # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import (absolute_import, division, print_function) from __future__ import annotations
__metaclass__ = type
import os import os
import hashlib import hashlib

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save