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



##########
File path: python/pyspark/_typing.pyi
##########
@@ -17,17 +17,27 @@
 # under the License.
 
 from typing import Callable, Iterable, Sized, TypeVar, Union
-from typing_extensions import Protocol
+from typing_extensions import Literal, Protocol
+
+from numpy import int32, int64, float32, float64, ndarray

Review comment:
       It is safe. This is still a stub file, so at the moment it is not even 
importable on runtime (and all the imports are handled in `if TYPE_CHECKING` 
blocks).
   
   If we ever want to migrate this to type `.py`, it might be a problem, but so 
will be `typing_extensions`.




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