You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/11/21 11:13:55 UTC
[GitHub] [spark] zero323 commented on a change in pull request #34513: [SPARK-37234][PYTHON] Inline type hints for python/pyspark/mllib/stat/_statistics.py
zero323 commented on a change in pull request #34513:
URL: https://github.com/apache/spark/pull/34513#discussion_r753783981
##########
File path: python/pyspark/mllib/linalg/__init__.pyi
##########
@@ -68,6 +68,7 @@ class Vector:
__UDT__: VectorUDT
def toArray(self) -> ndarray: ...
def asML(self) -> newlinalg.Vector: ...
+ def __len__(self) -> int: ...
Review comment:
This doesn't look right. ATM `Vector` has not `__len__` method (only subclassess do), so shouldn't have annotation for it.
I believe we should `type: ignore` this for now, and decide if and how to adjust parent class definitions separately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org