From acd6e63ee21f1f2d598d211e50ef7f63674ba21d Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 5 Nov 2024 11:46:02 +0100 Subject: [PATCH] update --- plugins/module_utils/_apypie.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/module_utils/_apypie.py b/plugins/module_utils/_apypie.py index 264dba4f1..cd0c73984 100644 --- a/plugins/module_utils/_apypie.py +++ b/plugins/module_utils/_apypie.py @@ -2,7 +2,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type try: - from typing import Any, Iterable, List, Optional, Tuple # pylint: disable=unused-import # noqa: F401 + from typing import Any, Iterable, List, Optional, Set, Tuple, cast # pylint: disable=unused-import # noqa: F401 except ImportError: pass @@ -625,8 +625,6 @@ class InvalidArgumentTypesError(Exception): import time -from typing import cast, Optional, Set, Tuple - PER_PAGE = 2 << 31 @@ -798,7 +796,7 @@ def update(self, resource: str, desired_entity: dict, params: Optional[dict] = N payload.update(params) return self.resource_action(resource, 'update', payload) - def delete(self, resource: str, current_entity: dict, params: Optional[dict] = None) -> None: # pylint: disable=useless-return + def delete(self, resource: str, current_entity: dict, params: Optional[dict] = None) -> None: """ Delete a given entity @@ -817,8 +815,6 @@ def delete(self, resource: str, current_entity: dict, params: Optional[dict] = N if entity and isinstance(entity, dict) and 'error' in entity and 'message' in entity['error']: raise ForemanApiException(msg=entity['error']['message']) - return None - def validate_payload(self, resource: str, action: str, payload: dict) -> Tuple[dict, Set[str]]: """ Check whether the payload only contains supported keys.