Factory¶
Sorry, the person who is responsible for the description was eaten by hydras last week.
- hydra_slayer.factory.call_meta_factory(factory: Union[Type, Callable[[...], Any]], args: Tuple, kwargs: Mapping)[source]¶
Creates a new instance from
factory
.- Parameters
factory – factory to create instance from
args – *args to pass to the factory
kwargs – **kwargs to pass to the factory
- Returns
Instance.
- hydra_slayer.factory.default_meta_factory(factory: Union[Type, Callable[[...], Any]], args: Tuple, kwargs: Mapping)[source]¶
Creates a new instance from
factory
iffactory
is class (likecall_meta_factory()
), else returns a new partial object (likepartial_meta_factory()
).- Parameters
factory – factory to create instance from
args – *args to pass to the factory
kwargs – **kwargs to pass to the factory
- Returns
Instance.
- hydra_slayer.factory.partial_meta_factory(factory: Union[Type, Callable[[...], Any]], args: Tuple, kwargs: Mapping)[source]¶
Returns a new partial object which when called will behave like func called with the positional arguments
args
and keyword argumentskwargs
.- Parameters
factory – factory to create instance from
args – *args to merge into the factory
kwargs – **kwargs to merge into the factory
- Returns
Partial object.