Skip to content

Commit

Permalink
Fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
himkt committed Jun 7, 2022
1 parent f7e7098 commit 616dff2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions optuna/_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def deprecated_func(
removed_version:
The version in which the target feature will be removed.
name:
The name of the feature. Defaults to the function or class name. Optional.
The name of the feature. Defaults to the function name. Optional.
text:
The additional text for the deprecation note. The default note is build using specified
``deprecated_version`` and ``removed_version``. If you want to provide additional
Expand Down Expand Up @@ -128,7 +128,7 @@ def deprecated_class(
removed_version:
The version in which the target feature will be removed.
name:
The name of the feature. Defaults to the function or class name. Optional.
The name of the feature. Defaults to the class name. Optional.
text:
The additional text for the deprecation note. The default note is build using specified
``deprecated_version`` and ``removed_version``. If you want to provide additional
Expand Down
8 changes: 7 additions & 1 deletion optuna/_experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def experimental_func(
Args:
version: The first version that supports the target feature.
name: The name of the feature. Defaults to the function or class name. Optional.
name: The name of the feature. Defaults to the function name. Optional.
"""

_validate_version(version)
Expand Down Expand Up @@ -80,6 +80,12 @@ def experimental_class(
version: str,
name: Optional[str] = None,
) -> Callable[[CT], CT]:
"""Decorate class as experimental.
Args:
version: The first version that supports the target feature.
name: The name of the feature. Defaults to the class name. Optional.
"""

_validate_version(version)

Expand Down

0 comments on commit 616dff2

Please sign in to comment.