added an proper __dir__ method to _Types metaclass
Dieser Commit ist enthalten in:
Ursprung
ac2fbcd29a
Commit
8a11393830
|
@ -71,10 +71,18 @@ class _Type(type):
|
|||
return partial(self._individual[__name], self)
|
||||
raise AttributeError(f"Attribut {__name} not found.")
|
||||
|
||||
def __dir__(self):
|
||||
data = set()
|
||||
data.update(("__dir__", "__doc__", "__annotations__"))
|
||||
data.update(self._virtual)
|
||||
data.update(self._individual.keys())
|
||||
return tuple(data)
|
||||
|
||||
|
||||
class Types(metaclass=_Type):
|
||||
"""Provides helpers for the ansible types"""
|
||||
|
||||
@staticmethod
|
||||
def list(
|
||||
self,
|
||||
elements: Union[Type[object], str],
|
||||
|
|
Laden…
In neuem Issue referenzieren