You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Haotian Sun (Jira)" <ji...@apache.org> on 2026/07/24 00:10:00 UTC

[jira] [Created] (SPARK-58312) Remove unnecessary type: ignore comments in pyspark.sql.udf and group

Haotian Sun created SPARK-58312:
-----------------------------------

             Summary: Remove unnecessary type: ignore comments in pyspark.sql.udf and group
                 Key: SPARK-58312
                 URL: https://issues.apache.org/jira/browse/SPARK-58312
             Project: Spark
          Issue Type: Improvement
          Components: PySpark
    Affects Versions: 4.3.0
            Reporter: Haotian Sun


Several # type: ignore comments in python/pyspark/sql/udf.py and python/pyspark/sql/group.py can be removed by fixing the underlying type issues:
 * In UDFRegistration.register, a UDF is built and wrapped by _create_udf, then immediately unwrapped via the ._unwrapped attribute. Building the UserDefinedFunction directly removes this round-trip and 2 [attr-defined] ignores.
 * In group.py, the @dfapi/@df_varargs_api decorated methods intentionally have docstring-only bodies and trigger 6 [empty-body] ignores. These are replaced by a single file-level disable-error-code directive, matching the style already used in dataframe.py, column.py, window.py, and table_arg.py.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org