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 2022/03/12 17:35:47 UTC

[GitHub] [spark] zero323 commented on a change in pull request #35530: [SPARK-37405][PYTHON] Inline type hints for python/pyspark/ml/feature.py

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



##########
File path: python/pyspark/ml/feature.py
##########
@@ -40,6 +53,12 @@
 from pyspark.ml.wrapper import JavaEstimator, JavaModel, JavaParams, JavaTransformer, _jvm
 from pyspark.ml.common import inherit_doc
 
+if TYPE_CHECKING:
+    from py4j.java_gateway import JavaObject  # type: ignore[import]
+
+JM = TypeVar("JM", bound=JavaTransformer)
+P = TypeVar("P", bound=Params)

Review comment:
       `P` could be safely imported from `ml._typing` if I recall correctly.




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