Commit Graph

15 Commits

Author SHA1 Message Date
Matt Clay
eb475e23f7
ansible-test - Update utility containers (#84545) 2025-01-11 01:09:48 +00:00
Matt Clay
96c04e9d1d
ansible-test - Update PyPI and utility container (#83475) 2024-06-19 01:31:33 +00:00
Matt Clay
5af5b4b6c8
ansible-test - Update PyPI test container to 3.1.0 (#83432) 2024-06-13 08:52:43 -07:00
Matt Clay
b8483adb33
ansible-test - Update pypi-test-container (#83273) 2024-05-19 12:35:44 -07:00
Matt Clay
c3926268e2
ansible-test - Avoid using atexit module (#81096) 2023-06-21 14:41:25 -07:00
Matt Clay
cdeb607b1d
ansible-test - Always use unique container names (#80724) 2023-05-04 15:41:14 -07:00
Matt Clay
c9f20aedc0
ansible-test - Fix various type hinting issues. (#79798)
* ansible-test - Add missing type hints.

* ansible-test - Remove redundant type hints.

* ansible-test - Fix return type annotations.

* ansible-test - Add assert, casts to assist mypy.

* ansible-test - Fix incorrect type hints.

* ansible-test - Remove no-op code.

* ansible-test - Fix incorrect types.

* ansible-test - Fix method signature mismatch.
2023-01-23 16:56:07 -08:00
Matt Clay
85acf4d1e5
ansible-test - Avoid use of deprecated type hints. (#78456)
* ansible-test - Avoid use of deprecated type hints.

PEP 585 deprecated many container types in the `typing` module in favor of the actual types, which support subscripting as of Python 3.9.

Conversion of `t.Type` was skipped since PyCharm does not currently recognize it.

* ansible-test - Fix `t` and `c` imports/shadowing.
2022-08-04 22:29:38 -07:00
Matt Clay
5bee66fc5d
ansible-test - More type hint updates. (#78455)
* Simple regex replace of multi-line function arg annotations on the first line.

* Manually fix up ArgumentParser type annotations.

* Manual type hint conversions.

* Manual conversion of function type hints.

* Remove unnecessary type hints on for statements.
2022-08-04 15:51:11 -07:00
Matt Clay
3eb0485dd9
ansible-test - Use more native type hints. (#78435)
* ansible-test - Use more native type hints.

Simple search and replace to switch from comments to native type hints for return types of functions with no arguments.

* ansible-test - Use more native type hints.

Conversion of simple single-line function annotation type comments to native type hints.

* ansible-test - Use more native type hints.

Conversion of single-line function annotation type comments with default values to native type hints.

* ansible-test - Use more native type hints.

Manual conversion of type annotation comments for functions which have pylint directives.
2022-08-03 15:08:55 -07:00
Matt Clay
289cba333b ansible-test - More multi-arch containers. 2022-05-25 14:55:17 -07:00
Matt Clay
5c2d830dea
ansible-test - Fix subprocess management. (#77641)
* Run code-smell sanity tests in UTF-8 Mode.
* Update subprocess use in sanity test programs.
* Use raw_command instead of run_command with always=True set.
* Add more capture=True usage.
* Don't expose stdin to subprocesses.
* Capture more output. Warn on retry.
* Add more captures.
* Capture coverage cli output.
* Capture windows and network host checks.
* Be explicit about interactive usage.
* Use a shell for non-captured, non-interactive subprocesses.
* Add integration test to assert no TTY.
* Add unit test to assert no TTY.
* Require blocking stdin/stdout/stderr.
* Use subprocess.run in ansible-core sanity tests.
* Remove unused arg.
* Be explicit with subprocess.run check=False.
* Add changelog.
* Use a Python subprocess instead of a shell.
* Use InternalError instead of Exception.
* Require capture argument.
* Check for invalid raw_command arguments.
* Removed pointless communicate=True usage.
* Relocate stdout w/o capture check.
* Use threads instead of a subprocess for IO.
2022-04-27 14:07:15 -07:00
Matt Clay
a06fa496d3
ansible-test - Code cleanup and refactoring. (#77169)
* Remove unnecessary PyCharm ignores.
* Ignore intentional undefined attribute usage.
* Add missing type hints. Fix existing type hints.
* Fix docstrings and comments.
* Use function to register completion handler.
* Pass strings to display functions.
* Fix CompositeAction handling of dest argument.
* Use consistent types in expressions/assignments.
* Use custom function to keep linters happy.
* Add missing raise for custom exception.
* Clean up key/value type handling in cloud plugins.
* Use dataclass instead of dict for results.
* Add custom type_guard function to check lists.
* Ignore return type that can't be checked (yet).
* Avoid changing types on local variables.
2022-02-28 14:37:09 -08:00
Matt Clay
68ab92e22a ansible-test - Remove support for Python 2.6.
Deferring removal of obsolete constraints until container updates are required.
2021-09-30 14:13:50 -07:00
Matt Clay
4ea8d9a782
ansible-test - split controller/target testing (#75605) 2021-09-20 18:39:07 -07:00