From be066973cc3b9447a965fb9b7ffa585880e7d5de Mon Sep 17 00:00:00 2001 From: Teoman ONAY Date: Fri, 3 Feb 2023 15:27:02 +0100 Subject: [PATCH 1/2] whitelist_externals in tox.ini deprecated Replaced by allowlist_externals https://tox.wiki/en/latest/changelog.html#deprecations-and-removals-4-0-0rc4 Signed-off-by: Teoman ONAY (cherry picked from commit a34d232ec8f3da9d522b11085a24f356b172f6dd) --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 7da28eb..0fd05e4 100644 --- a/tox.ini +++ b/tox.ini @@ -28,7 +28,7 @@ setenv= commands = py.test -vvv -n=auto {toxinidir}/tests/library/ {toxinidir}/tests/module_utils [testenv:{el8,el9}-functional] -whitelist_externals = +allowlist_externals = vagrant bash pip From 8ed26c49762829201a474095e9e8f25f1afa4325 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 30 Nov 2022 08:55:50 +0100 Subject: [PATCH 2/2] library: make the code PEP 484 compliant Typical message: ``` PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True ``` See https://github.com/hauntsaninja/no_implicit_optional for more details Signed-off-by: Guillaume Abrioux (cherry picked from commit 986b144dbf7875632296bf894b5c78910a6b0e12) (cherry picked from commit 35fd60d0a641acb11e6dad48523427599b1e6f46) --- library/ceph_orch_host.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/ceph_orch_host.py b/library/ceph_orch_host.py index 944f509..d7b58cb 100644 --- a/library/ceph_orch_host.py +++ b/library/ceph_orch_host.py @@ -15,7 +15,7 @@ # limitations under the License. from __future__ import absolute_import, division, print_function -from typing import List, Tuple +from typing import Optional, List, Tuple __metaclass__ = type from ansible.module_utils.basic import AnsibleModule # type: ignore @@ -134,7 +134,7 @@ def update_host(module: "AnsibleModule", action: str, name: str, address: str = '', - labels: List[str] = None) -> Tuple[int, List[str], str, str]: + labels: Optional[List[str]] = None) -> Tuple[int, List[str], str, str]: cmd = build_base_cmd_orch(module) cmd.extend(['host', action, name]) if action == 'add' and address: