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/10/28 06:16:57 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #34413: [SPARK-37140][PYTHON] Inline type hints for python/pyspark/resultiterable.py

HyukjinKwon commented on a change in pull request #34413:
URL: https://github.com/apache/spark/pull/34413#discussion_r738051471



##########
File path: python/pyspark/resultiterable.py
##########
@@ -15,26 +15,31 @@
 # limitations under the License.
 #
 
-from collections.abc import Iterable
+from typing import TypeVar, TYPE_CHECKING, Type, Iterator
+
+if TYPE_CHECKING:
+    from pyspark._typing import SizedIterable
 
 
 __all__ = ["ResultIterable"]
 
+T = TypeVar("T")
+
 
-class ResultIterable(Iterable):
+class ResultIterable(Type["SizedIterable[T]"]):  # type: ignore[misc]

Review comment:
       why did we ignore this?




-- 
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