gaogaotiantian commented on code in PR #56654: URL: https://github.com/apache/spark/pull/56654#discussion_r3455669337
########## python/pyspark/sql/tests/connect/test_connect_context.py: ########## @@ -14,6 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# PEP 563: make annotations lazy strings so any annotation referencing a +# grpc-only connect type is never evaluated at class-definition time. The +# connect.context imports below are guarded by should_test_connect, so on a +# classic-only / no-grpc image those names are undefined; lazy annotations keep +# module collection from raising NameError there. +from __future__ import annotations Review Comment: I think it's fine to use `annotations` but most of our code base just quote the class. aka `-> "HiveContext"` instead of `-> HiveContext`. -- 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]
