File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1313
1414FUNCTION_DOCSTRING_IGNORE_LIST = [
1515 "sklearn.utils.extmath.fast_logdet" ,
16- "sklearn.utils.metaestimators.if_delegate_has_method" ,
1716]
1817FUNCTION_DOCSTRING_IGNORE_LIST = set (FUNCTION_DOCSTRING_IGNORE_LIST )
1918
Original file line number Diff line number Diff line change @@ -142,22 +142,27 @@ def _check(self, obj):
142142
143143# TODO(1.3) remove
144144def if_delegate_has_method (delegate ):
145- """Create a decorator for methods that are delegated to a sub-estimator
146-
147- This enables ducktyping by hasattr returning True according to the
148- sub-estimator.
145+ """Create a decorator for methods that are delegated to a sub-estimator.
149146
150147 .. deprecated:: 1.3
151148 `if_delegate_has_method` is deprecated in version 1.1 and will be removed in
152149 version 1.3. Use `available_if` instead.
153150
151+ This enables ducktyping by hasattr returning True according to the
152+ sub-estimator.
153+
154154 Parameters
155155 ----------
156156 delegate : str, list of str or tuple of str
157157 Name of the sub-estimator that can be accessed as an attribute of the
158158 base object. If a list or a tuple of names are provided, the first
159159 sub-estimator that is an attribute of the base object will be used.
160160
161+ Returns
162+ -------
163+ callable
164+ Callable makes the decorated method available if the delegate
165+ has a method with the same name as the decorated method.
161166 """
162167 if isinstance (delegate , list ):
163168 delegate = tuple (delegate )
You can’t perform that action at this time.
0 commit comments