mirror of https://github.com/ansible/ansible.git
ansible-test - Clean up future boilerplate. (#76874)
* ansible-test - Clarify need for empty __init__.py * ansible-test - Update code-smell boilerplate. * Update code-smell boilerplate for core. * Update future boilerplate test for ansible-test. All ansible-test code (except for targets) and core-specific sanity tests now use the same boilerplate. The test also checks for unwanted `__future__` and `metaclass` boilerplate. * Relocate target tools to the correct directory. Several tools used on target Python versions were incorrectly placed in the controller directory.pull/76875/head
parent
3816815db0
commit
d19b506ce8
@ -0,0 +1,2 @@
|
|||||||
|
# Empty __init__.py to allow importing of `ansible_test._util.target.common` under Python 2.x.
|
||||||
|
# This allows the ansible-test entry point to report supported Python versions before exiting.
|
@ -1,3 +1,2 @@
|
|||||||
"""Nearly empty __init__.py to allow importing under Python 2.x."""
|
# Empty __init__.py to allow importing of `ansible_test._util.target.common` under Python 2.x.
|
||||||
from __future__ import (absolute_import, division, print_function)
|
# This allows the ansible-test entry point to report supported Python versions before exiting.
|
||||||
__metaclass__ = type
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
"""Block the sphinx module from being loaded."""
|
"""Block the sphinx module from being loaded."""
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import annotations
|
||||||
__metaclass__ = type
|
|
||||||
|
|
||||||
raise ImportError('The sphinx module has been prevented from loading to maintain consistent test results.')
|
raise ImportError('The sphinx module has been prevented from loading to maintain consistent test results.')
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
"""Nearly empty __init__.py to allow importing under Python 2.x."""
|
# Empty __init__.py to allow importing of `ansible_test._util.target.common` under Python 2.x.
|
||||||
from __future__ import (absolute_import, division, print_function)
|
# This allows the ansible-test entry point to report supported Python versions before exiting.
|
||||||
__metaclass__ = type
|
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
"""Nearly empty __init__.py to allow importing under Python 2.x."""
|
# Empty __init__.py to allow importing of `ansible_test._util.target.common` under Python 2.x.
|
||||||
from __future__ import (absolute_import, division, print_function)
|
# This allows the ansible-test entry point to report supported Python versions before exiting.
|
||||||
__metaclass__ = type
|
|
||||||
|
Loading…
Reference in New Issue