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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]