Skip to content

Commit

Permalink
remove inherit_doc from __init__
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed Jan 28, 2015
1 parent edbd6fe commit 415268e
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions python/pyspark/ml/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,10 @@
from abc import ABCMeta, abstractmethod

from pyspark.ml.param import Param, Params

__all__ = ['Estimator', 'Transformer', 'Pipeline', 'PipelineModel']
from pyspark.ml.util import inherit_doc


def inherit_doc(cls):
for name, func in vars(cls).items():
# only inherit docstring for public functions
if name.startswith("_"):
continue
if not func.__doc__:
for parent in cls.__bases__:
parent_func = getattr(parent, name, None)
if parent_func and getattr(parent_func, "__doc__", None):
func.__doc__ = parent_func.__doc__
break
return cls
__all__ = ['Estimator', 'Transformer', 'Pipeline', 'PipelineModel']


@inherit_doc
Expand Down

0 comments on commit 415268e

Please sign in to comment.