Skip to content

Commit 415268e

Browse files
committed
remove inherit_doc from __init__
1 parent edbd6fe commit 415268e

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

python/pyspark/ml/pipeline.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,10 @@
1818
from abc import ABCMeta, abstractmethod
1919

2020
from pyspark.ml.param import Param, Params
21-
22-
__all__ = ['Estimator', 'Transformer', 'Pipeline', 'PipelineModel']
21+
from pyspark.ml.util import inherit_doc
2322

2423

25-
def inherit_doc(cls):
26-
for name, func in vars(cls).items():
27-
# only inherit docstring for public functions
28-
if name.startswith("_"):
29-
continue
30-
if not func.__doc__:
31-
for parent in cls.__bases__:
32-
parent_func = getattr(parent, name, None)
33-
if parent_func and getattr(parent_func, "__doc__", None):
34-
func.__doc__ = parent_func.__doc__
35-
break
36-
return cls
24+
__all__ = ['Estimator', 'Transformer', 'Pipeline', 'PipelineModel']
3725

3826

3927
@inherit_doc

0 commit comments

Comments
 (0)