Skip to content

Commit

Permalink
Removed duplicate since decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
noel-smith committed Sep 9, 2015
1 parent cde592a commit e6a4c47
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions python/pyspark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,6 @@ def deco(f):
# for back compatibility
from pyspark.sql import SQLContext, HiveContext, SchemaRDD, Row


def since(version):
"""
A decorator that annotates a function to append the version of Spark the function was added.
"""
import re
indent_p = re.compile(r'\n( +)')

def deco(f):
if f.__doc__ is None:
f.__doc__ = ".. versionadded:: {}".format(version)
return f
else:
indents = indent_p.findall(f.__doc__)
indent = ' ' * (min(len(m) for m in indents) if indents else 0)
f.__doc__ = "{}\n\n{}.. versionadded:: {}".format(f.__doc__.rstrip(), indent, version)
return f
return deco


__all__ = [
"SparkConf", "SparkContext", "SparkFiles", "RDD", "StorageLevel", "Broadcast",
"Accumulator", "AccumulatorParam", "MarshalSerializer", "PickleSerializer",
Expand Down

0 comments on commit e6a4c47

Please sign in to comment.