aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMechCoder <manojkumarsivaraj334@gmail.com>2015-07-15 08:25:53 -0700
committerDavies Liu <davies.liu@gmail.com>2015-07-15 08:25:53 -0700
commit20bb10f8644a92a57496b5df639008832b30e34d (patch)
tree9b455807bd130409773697ab566feb05c29f729b /python
parentadb33d3665770daf2ccb8915d19e198be9dc3b47 (diff)
downloadspark-20bb10f8644a92a57496b5df639008832b30e34d.tar.gz
spark-20bb10f8644a92a57496b5df639008832b30e34d.tar.bz2
spark-20bb10f8644a92a57496b5df639008832b30e34d.zip
[SPARK-8706] [PYSPARK] [PROJECT INFRA] Add pylint checks to PySpark
This adds Pylint checks to PySpark. For now this lazy installs using easy_install to /dev/pylint (similar to the pep8 script). We still need to figure out what rules to be allowed. Author: MechCoder <manojkumarsivaraj334@gmail.com> Closes #7241 from MechCoder/pylint and squashes the following commits: 2fc7291 [MechCoder] Remove pylint test fail 6d883a2 [MechCoder] Silence warnings and make pylint tests fail to check if it works in jenkins f3a5e17 [MechCoder] undefined-variable ca8b749 [MechCoder] Minor changes 71629f8 [MechCoder] remove trailing whitespace 8498ff9 [MechCoder] Remove blacklisted arguments and pointless statements check 1dbd094 [MechCoder] Disable all checks for now 8b8aa8a [MechCoder] Add pylint configuration file 7871bb1 [MechCoder] [SPARK-8706] [PySpark] [Project infra] Add pylint checks to PySpark
Diffstat (limited to 'python')
-rw-r--r--python/pyspark/ml/param/shared.py4
-rw-r--r--python/pyspark/tests.py3
2 files changed, 4 insertions, 3 deletions
diff --git a/python/pyspark/ml/param/shared.py b/python/pyspark/ml/param/shared.py
index bc088e4c29..5951247263 100644
--- a/python/pyspark/ml/param/shared.py
+++ b/python/pyspark/ml/param/shared.py
@@ -444,7 +444,7 @@ class DecisionTreeParams(Params):
minInfoGain = Param(Params._dummy(), "minInfoGain", "Minimum information gain for a split to be considered at a tree node.")
maxMemoryInMB = Param(Params._dummy(), "maxMemoryInMB", "Maximum memory in MB allocated to histogram aggregation.")
cacheNodeIds = Param(Params._dummy(), "cacheNodeIds", "If false, the algorithm will pass trees to executors to match instances with nodes. If true, the algorithm will cache node IDs for each instance. Caching can speed up training of deeper trees.")
-
+
def __init__(self):
super(DecisionTreeParams, self).__init__()
@@ -460,7 +460,7 @@ class DecisionTreeParams(Params):
self.maxMemoryInMB = Param(self, "maxMemoryInMB", "Maximum memory in MB allocated to histogram aggregation.")
#: param for If false, the algorithm will pass trees to executors to match instances with nodes. If true, the algorithm will cache node IDs for each instance. Caching can speed up training of deeper trees.
self.cacheNodeIds = Param(self, "cacheNodeIds", "If false, the algorithm will pass trees to executors to match instances with nodes. If true, the algorithm will cache node IDs for each instance. Caching can speed up training of deeper trees.")
-
+
def setMaxDepth(self, value):
"""
Sets the value of :py:attr:`maxDepth`.
diff --git a/python/pyspark/tests.py b/python/pyspark/tests.py
index c5c0add49d..2122501680 100644
--- a/python/pyspark/tests.py
+++ b/python/pyspark/tests.py
@@ -893,7 +893,8 @@ class RDDTests(ReusedPySparkTestCase):
self.assertRaises(Py4JJavaError, rdd.pipe('cc', checkCode=True).collect)
result = rdd.pipe('cat').collect()
result.sort()
- [self.assertEqual(x, y) for x, y in zip(data, result)]
+ for x, y in zip(data, result):
+ self.assertEqual(x, y)
self.assertRaises(Py4JJavaError, rdd.pipe('grep 4', checkCode=True).collect)
self.assertEqual([], rdd.pipe('grep 4').collect())