made list static
Dieser Commit ist enthalten in:
Ursprung
437cf72c79
Commit
40f4b11300
|
@ -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,
|
||||
|
|
Laden…
In neuem Issue referenzieren