From 40f4b11300eba1de65a3bc6e7ce6fa3cd86f6e22 Mon Sep 17 00:00:00 2001 From: Sebastian Tobie Date: Fri, 21 Apr 2023 18:00:20 +0200 Subject: [PATCH] made list static --- plugins/module_utils/generic.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/module_utils/generic.py b/plugins/module_utils/generic.py index 8024e3a..737a11d 100644 --- a/plugins/module_utils/generic.py +++ b/plugins/module_utils/generic.py @@ -1,5 +1,4 @@ import pathlib -from functools import partial from typing import Any, Callable, Dict, Optional, Sequence, Tuple, Type, Union __all__ = ( @@ -68,7 +67,7 @@ class _Type(type): if __name in self._virtual: return self._vfunc(self, __name) if __name in self._individual: - return partial(self._individual[__name], self) + return self._individual[__name] return super().__getattribute__(__name) def __dir__(self): @@ -82,9 +81,7 @@ class _Type(type): class Types(metaclass=_Type): """Provides helpers for the ansible types""" - @staticmethod def list( - self, elements: Union[Type[object], str], required: bool = False, help: Optional[str] = None,