Fokko commented on a change in pull request #29121:
URL: https://github.com/apache/spark/pull/29121#discussion_r461329483
##########
File path: python/pyspark/ml/tests/test_stat.py
##########
@@ -40,7 +40,7 @@ def test_chisquaretest(self):
if __name__ == "__main__":
- from pyspark.ml.tests.test_stat import *
+ from pyspark.ml.tests.test_stat import * # noqa: F401
Review comment:
Thanks @HyukjinKwon. It looks like it is being used by Jenkins indeed. I
will try to remove the imports to see if the tests are still being picked up by
Jenkins. These imports look redundant since it is importing the file itself 🤔
##########
File path: python/pyspark/sql/functions.py
##########
@@ -29,9 +29,9 @@
from pyspark.sql.dataframe import DataFrame
from pyspark.sql.types import StringType, DataType
# Keep UserDefinedFunction import for backwards compatible import; moved in
SPARK-22409
-from pyspark.sql.udf import UserDefinedFunction, _create_udf
Review comment:
Thanks!
##########
File path: python/pyspark/ml/tests/test_wrapper.py
##########
@@ -116,9 +116,8 @@ def test_new_java_array(self):
java_array = JavaWrapper._new_java_array(str_list, java_class)
self.assertEqual(_java2py(self.sc, java_array), expected_str_list)
-if __name__ == "__main__":
- from pyspark.ml.tests.test_wrapper import *
Review comment:
Just a small spike, I believe this is redundant. You're importing
everything from the file itself. Let's wait for Jenkins to see if the file is
being reported by Jenkins unit test report. If so, the import is not needed, if
not, then it is required.
##########
File path: python/pyspark/ml/tests/test_stat.py
##########
@@ -40,7 +40,7 @@ def test_chisquaretest(self):
if __name__ == "__main__":
- from pyspark.ml.tests.test_stat import *
+ from pyspark.ml.tests.test_stat import * # noqa: F401
Review comment:
Ack! Missed that one. I've reverted the imports :)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]