gaogaotiantian commented on code in PR #55532:
URL: https://github.com/apache/spark/pull/55532#discussion_r3184963244


##########
python/pyspark/worker.py:
##########
@@ -234,46 +251,56 @@ def chain(f, g):
     return lambda *a: g(f(*a))
 
 
-def verify_result(expected_type: type) -> Callable[[Any], Iterator]:
-    """
-    Create a result verifier that checks both iterability and element types.
+@overload

Review Comment:
   Let's do explicit type ignore at callsite. The `Any -> Any` case basically 
breaks other checks. All the iterator cases fall into the `Any` case and we 
lose track of the actual data type. Let's throw away any `Any`, use `type: 
ignore[type-abstract]` to ignore that warning. We will still have a lot of 
information (the return type from the function for example).



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