dchvn commented on a change in pull request #34433:
URL: https://github.com/apache/spark/pull/34433#discussion_r749023767



##########
File path: python/pyspark/__init__.py
##########
@@ -111,13 +124,13 @@ def keyword_only(func):
     """
 
     @wraps(func)
-    def wrapper(self, *args, **kwargs):
+    def wrapper(self: Any, *args: Any, **kwargs: Any) -> Any:
         if len(args) > 0:
             raise TypeError("Method %s forces keyword arguments." % 
func.__name__)
         self._input_kwargs = kwargs
         return func(self, **kwargs)
 
-    return wrapper
+    return cast(F, wrapper)

Review comment:
       Because we expect output is `F` type so I think we should just cast




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