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



##########
File path: python/pyspark/sql/dataframe.py
##########
@@ -2348,7 +2569,7 @@ def replace(self, to_replace, value=_NoValue, 
subset=None):
                 raise TypeError("value argument is required when to_replace is 
not a dictionary.")
 
         # Helper functions
-        def all_of(types):
+        def all_of(types: Union[Type, Tuple[Type, ...]]) -> 
Callable[[Iterable], bool]:

Review comment:
       This is OK, as long as we don't need `[]`. In fact, we'll have to go the 
other way in the future as `typing` variants having `collections.abc` 
counterpart aredeprecated in 3.9 ([PEP 
585](https://www.python.org/dev/peps/pep-0585/)) 




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