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/11 10:08:42 UTC

[GitHub] [spark] zero323 commented on a change in pull request #34238: [SPARK-36969][PYTHON] Inline type hints for SparkContext

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



##########
File path: python/pyspark/context.py
##########
@@ -562,19 +636,28 @@ def f(split, iterator):
         # Make sure we distribute data evenly if it's smaller than self.batchSize
         if "__len__" not in dir(c):
             c = list(c)    # Make it a list so we can compute its length
-        batchSize = max(1, min(len(c) // numSlices, self._batchSize or 1024))
+        batchSize = max(
+            1,
+            min(len(c) // numSlices, self._batchSize or 1024)  # type: ignore[arg-type]

Review comment:
       This should be handled with either `cast` or type assertion, not ignore.




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