diff --git a/python/pyspark/mllib/clustering.py b/python/pyspark/mllib/clustering.py index fd33887fd9e2b..bf8073c2a2e2a 100644 --- a/python/pyspark/mllib/clustering.py +++ b/python/pyspark/mllib/clustering.py @@ -176,7 +176,7 @@ class BisectingKMeans: @classmethod def train( - self, + cls, rdd: RDD["VectorLike"], k: int = 4, maxIterations: int = 20, diff --git a/python/pyspark/testing/sqlutils.py b/python/pyspark/testing/sqlutils.py index 3eb58ffee87d3..92fcd08091c47 100644 --- a/python/pyspark/testing/sqlutils.py +++ b/python/pyspark/testing/sqlutils.py @@ -79,7 +79,7 @@ class ExamplePointUDT(UserDefinedType): """ @classmethod - def sqlType(self): + def sqlType(cls): return ArrayType(DoubleType(), False) @classmethod @@ -124,7 +124,7 @@ class PythonOnlyUDT(UserDefinedType): """ @classmethod - def sqlType(self): + def sqlType(cls): return ArrayType(DoubleType(), False) @classmethod