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



##########
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:
       This just doesn't look right.  If anything, it should be `class 
ResultIterable("SizedIterable[T]")`, but we can _probably_ skip it whatsoever 
and  use `Iterable[T]`.




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

Reply via email to