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/11/12 01:37:48 UTC

[GitHub] [spark] ueshin commented on a change in pull request #34563: [SPARK-37296][PYTHON] Add missing type hints in python/pyspark/util.py

ueshin commented on a change in pull request #34563:
URL: https://github.com/apache/spark/pull/34563#discussion_r747922607



##########
File path: python/pyspark/util.py
##########
@@ -369,39 +367,49 @@ class InheritableThread(threading.Thread):
     This API is experimental.
     """
 
-    def __init__(self, target, *args, **kwargs):
+    def __init__(self, target: Callable, *args: Any, **kwargs: Any):

Review comment:
       @HyukjinKwon This signature might not be good because this is different from the signature of `Thread.__init__`.
   
   ```py
       def __init__(
           self,
           group: None = ...,
           target: Optional[Callable[..., Any]] = ...,
           name: Optional[str] = ...,
           args: Iterable[Any] = ...,
           kwargs: Optional[Mapping[str, Any]] = ...,
           *,
           daemon: Optional[bool] = ...,
       ) -> None: ...
   ```
   
   I guess users can't specify `group`?




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