Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Nov 19, 2024
1 parent 242eb90 commit acd6e63
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions plugins/module_utils/_apypie.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -625,8 +625,6 @@ class InvalidArgumentTypesError(Exception):

import time

from typing import cast, Optional, Set, Tuple

PER_PAGE = 2 << 31


Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit acd6e63

Please sign in to comment.