Skip to content

Commit

Permalink
docs: DeprecationWarning: invalid escape sequence \* in hydra-slayer
Browse files Browse the repository at this point in the history
  • Loading branch information
bagxi committed Jan 4, 2024
1 parent 41c2153 commit f20f162
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions hydra_slayer/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def metafactory_factory(factory: Factory, args: Tuple, kwargs: Mapping):
Args:
factory: factory to create instance from
args: \*args to pass to the factory
kwargs: \*\*kwargs to pass to the factory
args: positional arguments to be passed into the factory
kwargs: keyword arguments to be passed into the factory
Returns:
Instance.
Expand Down Expand Up @@ -88,8 +88,8 @@ def call_meta_factory(factory: Factory, args: Tuple, kwargs: Mapping):
Args:
factory: factory to create instance from
args: \*args to pass to the factory
kwargs: \*\*kwargs to pass to the factory
args: positional arguments to be passed into the factory
kwargs: keyword arguments to be passed into the factory
Returns:
Instance.
Expand All @@ -112,8 +112,8 @@ def partial_meta_factory(factory: Factory, args: Tuple, kwargs: Mapping):
Args:
factory: factory to create instance from
args: \*args to merge into the factory
kwargs: \*\*kwargs to merge into the factory
args: positional arguments to be merged into the factory
kwargs: keyword arguments to be merged into the factory
Returns:
Partial object.
Expand All @@ -138,8 +138,8 @@ def default_meta_factory(factory: Factory, args: Tuple, kwargs: Mapping):
Args:
factory: factory to create instance from
args: \*args to pass to the factory
kwargs: \*\*kwargs to pass to the factory
args: positional arguments to be passed into the factory
kwargs: keyword arguments to be passed into the factory
Returns:
Instance.
Expand Down
4 changes: 2 additions & 2 deletions hydra_slayer/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def _get_instance(
factory_key: key to extract factory name from
get_factory_func: function that returns factory by its name.
Default: :py:func:`.functional.get_factory`
args: \*args to pass to the factory
kwargs: \*\*kwargs to pass to the factory
args: positional arguments to be passed into the factory
kwargs: keyword arguments to be passed into the factory
Returns:
created instance
Expand Down
8 changes: 4 additions & 4 deletions hydra_slayer/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def add(
factories: more instances
name: name to use for the first factory instance,
if a single instance is passed
named_factories: factory and their names as \*\*kwargs
named_factories: factory and their names as keyword arguments
Returns:
first factory passed
Expand Down Expand Up @@ -193,8 +193,8 @@ def get_instance(self, *args, **kwargs):
Creates instance by calling specified factory with ``instantiate_fn``.
Args:
*args: \*args to pass to the factory
**kwargs: \*\*kwargs to pass to the factory
*args: positional arguments to be passed into the factory
**kwargs: keyword arguments to be passed into the factory
Returns:
created instance
Expand All @@ -214,7 +214,7 @@ def get_from_params(
Args:
shared_params: params to pass on all levels in case of
recursive creation
**kwargs: \*\*kwargs to pass to the factory
**kwargs: keyword arguments to be passed into the factory
Returns:
result of calling ``instantiate_fn(factory, **sub_kwargs)``
Expand Down
2 changes: 1 addition & 1 deletion tests/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def test_get_from_params_var_method_with_params():


def test_fail_get_from_params_on_exclusive_keywords():
error_msg = "`.+` and `.+` \(in get mode\) keywords are exclusive"
error_msg = r"`.+` and `.+` \(in get mode\) keywords are exclusive"
with pytest.raises(ValueError, match=error_msg):
F.get_from_params(
**{
Expand Down

0 comments on commit f20f162

Please sign in to comment.