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/09/30 09:42:37 UTC
[GitHub] [spark] zero323 commented on a diff in pull request #38037: [SPARK-40537][CONNECT] Enable mypy for Spark Connect Python Client
zero323 commented on code in PR #38037:
URL: https://github.com/apache/spark/pull/38037#discussion_r984413264
##########
python/pyspark/sql/connect/function_builder.py:
##########
@@ -50,7 +53,9 @@ def _build(name: str, *args: ExpressionOrString) -> ScalarFunctionExpression:
class FunctionBuilder:
"""This class is used to build arbitrary functions used in expressions"""
- def __getattr__(self, name):
+ def __getattr__(
+ self, name: str
+ ) -> "Callable[[VarArg(ExpressionOrString)], ScalarFunctionExpression]":
Review Comment:
It would be better to avoid `VarArg`. It's deprecated anyway, and we already use `Protocols` for this purpose so let's be consistent.
--
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