File tree 2 files changed +9
-5
lines changed 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 13
13
14
14
FUNCTION_DOCSTRING_IGNORE_LIST = [
15
15
"sklearn.utils.extmath.fast_logdet" ,
16
- "sklearn.utils.metaestimators.if_delegate_has_method" ,
17
16
]
18
17
FUNCTION_DOCSTRING_IGNORE_LIST = set (FUNCTION_DOCSTRING_IGNORE_LIST )
19
18
Original file line number Diff line number Diff line change @@ -142,22 +142,27 @@ def _check(self, obj):
142
142
143
143
# TODO(1.3) remove
144
144
def 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.
149
146
150
147
.. deprecated:: 1.3
151
148
`if_delegate_has_method` is deprecated in version 1.1 and will be removed in
152
149
version 1.3. Use `available_if` instead.
153
150
151
+ This enables ducktyping by hasattr returning True according to the
152
+ sub-estimator.
153
+
154
154
Parameters
155
155
----------
156
156
delegate : str, list of str or tuple of str
157
157
Name of the sub-estimator that can be accessed as an attribute of the
158
158
base object. If a list or a tuple of names are provided, the first
159
159
sub-estimator that is an attribute of the base object will be used.
160
160
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.
161
166
"""
162
167
if isinstance (delegate , list ):
163
168
delegate = tuple (delegate )
You can’t perform that action at this time.
0 commit comments